Go to file
Julien Danjou 4e01f29baf Deprecate strtime
This patches deprecated strtime() as it's a either useless or a very bad
idea to use it.

It's useless because it's a 3 lines wrapper around utcnow(),
datetime.strftime() and isotime() so does not bring anything useful as
it can be replaced by one line of code in all cases.

It's a bad idea because contrary to what one could expect:

strtime() != isotime(subsecond=True)
strtime(dt) != isotime(dt, subsecond=True)

Also, it does not include any timezone information so it loses essential
information on the datetime object.

So it's really best to use isoformat() instead of strtime() in all
cases, so you are sure that if you end up comparing timestamps as string
(i.e. in tests) you are sure it's going to work, including the timezone.

Change-Id: I8b5119e64369ccac3423dccc04421f99912df733
2015-06-01 12:48:06 +02:00
2015-06-01 12:48:06 +02:00
2015-05-05 19:39:52 +00:00
2014-06-18 23:12:10 -04:00
2015-04-07 18:19:37 -07:00
2014-08-30 08:35:42 +00:00

oslo.utils

Latest Version

Downloads

The oslo.utils library provides support for common utility type functions, such as encoding, exception handling, string manipulation, and time handling.

Description
RETIRED, further work has moved to Debian project infrastructure
Readme 711 KiB
Languages
Python 93.9%
Gettext Catalog 6.1%