Internationalization and localization tools


Locale-Sensitive Python Method

datetime.combine(date, time, tzinfo=self.tzinfo)

Internationalization (I18n) Method Overview

The combine method combines a date object and a time object into one datetime object. If the tzinfo argument is provided, its value is used to set result's tzinfo, othersize the time's tzinfo is used.

Click here for more information.

I18n Issues

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

Because naive datetime objects are treated by many datetime methods as local times, it is preferred to use aware datetimes to represent times in UTC. The recommended way to create an object representing a specific timestamp in UTC is by calling datetime.fromtimestamp(timestamp, tz=timezone.utc).

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