caellion-python-commons: caellion.pycommons.serializers.datetime_serializer.DateTimeUnixMillisSerializer Class Reference

caellion-python-commons

Static Public Member Functions | List of all members
caellion.pycommons.serializers.datetime_serializer.DateTimeUnixMillisSerializer Class Reference

Implementation of DateTime serializer, using Unix-epoch based timestamp with millisecond precision as serialized format. More...

## Static Public Member Functions
def | deserialize (integer)
| Unserializes the unix timestamp with millisecond precision to DateTime object. More...
def | unserialize (integer)
| Unserializes the unix timestamp with millisecond precision to DateTime object. More...
def | serialize (datetime_to_serialize)
| Serializes the DateTime to Unix timestamp integer with millisecond precision. More...

## Detailed Description

Implementation of DateTime serializer, using Unix-epoch based timestamp with millisecond precision as serialized format.

Definition at line 51 of file datetime_serializer.py.

## Member Function Documentation

## ◆ deserialize()

def caellion.pycommons.serializers.datetime_serializer.DateTimeUnixMillisSerializer.deserialize | ( |  | integer | ) |
| static

Unserializes the unix timestamp with millisecond precision to DateTime object.

Always returns UTC timezone DateTime.

Alias for unserialize()

Parameters

  integer | unix timestamp integer (milliseconds)

Returns
  DateTime with UTC timezone

Definition at line 58 of file datetime_serializer.py.

## ◆ serialize()

def caellion.pycommons.serializers.datetime_serializer.DateTimeUnixMillisSerializer.serialize | ( |  | datetime_to_serialize | ) |
| static

Serializes the DateTime to Unix timestamp integer with millisecond precision.

Always returns UTC timezone integer.

Parameters

  datetime_to_serialize | DateTime to serialize to unix timestamp integer

Returns
  unix timestamp integer (milliseconds)

Definition at line 82 of file datetime_serializer.py.

## ◆ unserialize()

def caellion.pycommons.serializers.datetime_serializer.DateTimeUnixMillisSerializer.unserialize | ( |  | integer | ) |
| static

Unserializes the unix timestamp with millisecond precision to DateTime object.

Always returns UTC timezone DateTime.

Parameters

  integer | unix timestamp integer (milliseconds)

Returns
  DateTime with UTC timezone

Definition at line 71 of file datetime_serializer.py.

The documentation for this class was generated from the following file:

- caellion/pycommons/serializers/datetime_serializer.py