Internationalization and localization tools


Locale-Sensitive Python Method

datetime.utcfromtimestamp(timestamp)

Internationalization (I18n) Method Overview

The utcfromtimestamp method returns a datetime object.

Click here for more information.

I18n Issues

Python 3: The utcfromtimestamp method can have dangerous results in Python3 and should not be used. It is better to use fromtimestamp(timestamp, tz=timezone.utc).

In general, you should store dates and times in the UTC time zone and then display using the user's locale.

Please see Times and Dates for more information.

Globalyzer will detect this method and report it as an I18n issue. If you have determined that the call is being handled correctly, you can use Globalyzer's Ignore Comment functionality to ensure that it isn't picked up in a subsequent scan.

Locale-Sensitive Python Methods

Lingoport internationalization and localization services and software