Properly Handle Time Zones for Date/Time Fields

Document created by justin_petrone Employee on Aug 9, 2011Last modified by Adam Arrowsmith on Mar 28, 2017
Version 5Show Document
  • View in full screen mode

The following describes how to properly handle time zones for date/time fields.

 

It is important to understand when the mapping engine parses a value configured as date/time, it converts it to a special internal date format that looks like this:

 

yyyyMMdd HHmmss.SSS

 

This internal format does not contain a timezone offset. The implied timezone is that of the server on which the atom, molecule, or cloud is running. If the source value and date mask does not contain an offset, the value will be processed assuming the atom server's timezone. However, if the source value and date mask does contain an offset, it will automatically adjust the time value (see table below) for the atom's timezone.

 

One special example that is fairly common is converting from some timezone to UTC time (0 hour offset). If the source value contains offset information and the source profile element's input mask is configured with the appropriate date mask, the mapping engine can perform this transformation automatically.

 

The following table demonstrates how date values are converted from source to destination given slightly different date masks. In this example the atom is running on a server configured as Eastern Time.

 

Source

Destination

Comments

yyyy-MM-dd'T'HH:mm:ss.SSS

2010-04-27T20:30:14.000

yyyy-MM-dd'T'HH:mm:ss.SSS

2010-04-27T20:30:14.000

No offset specified, no adjustment

yyyy-MM-dd'T'HH:mm:ss.SSSZZ

2010-04-27T20:30:14.000-07:00

yyyy-MM-dd'T'HH:mm:ss.SSSZ

2010-04-27T23:30:14.000-0400

Pacific to atom time (Eastern), value adjusted

yyyy-MM-dd'T'HH:mm:ss.SSSZZ

2010-04-27T20:30:14.000-07:00

yyyy-MM-dd'T'HH:mm:ss.000ZZ

2010-04-27T23:30:14.000-04:00

Pacific to atom time (Eastern), valued adjusted, common web services format

 

For more about date formats, see Date/Time data type.

2 people found this helpful

Attachments

    Outcomes