Package upoints :: Module osm :: Class Timestamp
[hide private]
[frames] | no frames]

Class Timestamp

   object --+        
            |        
datetime.date --+    
                |    
datetime.datetime --+
                    |
                   Timestamp

Class for representing an OSM timestamp value
Instance Methods [hide private]
str
isoformat(self)
Generate an ISO 8601 formatted time stamp

Inherited from datetime.datetime: __add__, __eq__, __ge__, __getattribute__, __gt__, __hash__, __le__, __lt__, __ne__, __new__, __radd__, __reduce__, __repr__, __rsub__, __str__, __sub__, astimezone, combine, ctime, date, dst, fromtimestamp, now, replace, strptime, time, timetuple, timetz, tzname, utcfromtimestamp, utcnow, utcoffset, utctimetuple

Inherited from datetime.date: fromordinal, isocalendar, isoweekday, strftime, today, toordinal, weekday

Inherited from object: __delattr__, __init__, __reduce_ex__, __setattr__

Static Methods [hide private]
Timestamp
parse_isoformat(timestamp)
Parse an ISO 8601 formatted time stamp
Class Variables [hide private]

Inherited from datetime.datetime: max, min, resolution

Properties [hide private]

Inherited from datetime.datetime: hour, microsecond, minute, second, tzinfo

Inherited from datetime.date: day, month, year

Inherited from object: __class__

Method Details [hide private]

isoformat(self)

 
Generate an ISO 8601 formatted time stamp
Returns: str
ISO 8601 formatted time stamp
Overrides: datetime.date.isoformat

parse_isoformat(timestamp)
Static Method

 

Parse an ISO 8601 formatted time stamp

>>> Timestamp.parse_isoformat("2008-02-06T13:33:26+00:00")
Timestamp(2008, 2, 6, 13, 33, 26, tzinfo=TzOffset('+00:00'))
>>> Timestamp.parse_isoformat("2008-02-06T13:33:26+05:30")
Timestamp(2008, 2, 6, 13, 33, 26, tzinfo=TzOffset('+05:30'))
>>> Timestamp.parse_isoformat("2008-02-06T13:33:26-08:00")
Timestamp(2008, 2, 6, 13, 33, 26, tzinfo=TzOffset('-08:00'))
Parameters:
  • timestamp (str) - Timestamp to parse
Returns: Timestamp
Parsed timestamp