


Especially vunorable are legacy embedded systems and file systems or databases with with 32-bit time fields. Through this overflow, the system time will be the 13 December 1901, with will cause problems in some programms. This results in the so-called year 2038 problem, when the overflow of the timestamp will happen at the 19 January 2038. Some programming alnguages also use milliseconds for the offset (like JavaScript's date.getTime()) or even nanoseconds.ĭue to historical reasons, the unix timestamp is stored as signed 32-bit integer (to save memory). The unix time differs slightely from UTC time, bacause leap seconds are ignored.
#POSIX TIME CONVERTER CODE#
In no event shall Progress, its employees, or anyone else involved in the creation, production, or delivery of the code be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample code, even if Progress has been advised of the possibility of such damages.A unix timestamp (or Epoch Time) describes a point in time with the amount of passed seconds since the start of the Unix epoch at the 1 January 1970 00:00:00 UTC. The entire risk arising out of the use or performance of the sample code is borne by the user. Progress makes no warranties, express or implied, and disclaims all implied warranties including, without limitation, the implied warranties of merchantability or of fitness for a particular purpose. The sample code is provided on an "AS IS" basis.
#POSIX TIME CONVERTER SOFTWARE#
Progress Software Corporation makes no explicit or implied claims to the validity of this information.Īny sample code provided on this site is not supported under any Progress support program or service. However, the information provided is for your information only. Progress Software Corporation makes all reasonable efforts to verify this information. The advantage of POSIX is that you can easily and explicitly specify the time zone and daylight saving time (DST) details manually, however you wish. The origins of the information on this site may be internal or external to Progress Software Corporation (“Progress”). The POSIX time zone format is the traditionally used format for AIX systems and provides a slight performance advantage over the Olson time zone format. * following variable holds epoch time value (in milliseconds) */ĭEFINE VARIABLE vEpochTimeValue AS INT64 NO-UNDO INITIAL 1325635327000.ĪSSIGN vDateOrDateTimeTZ = ADD-INTERVAL(vDateOrDateTimeTZ,vEpochTimeValue,"MILLISECONDS").

These time values can also easily be converted into ABL DATETIME-TZ values using the following code:ĭEFINE VARIABLE vDateOrDateTimeTZ AS DATETIME-TZ NO-UNDO INITIAL. * display value to show it conforms to epoch base value (useful for datetime) */ĪSSIGN vDateOrDateTime = ADD-INTERVAL(vDateOrDateTime,vEpochTimeValue,"SECONDS"). * following variable holds epoch time value (in seconds) */ĭEFINE VARIABLE vEpochTimeValue AS INTEGER NO-UNDO INITIAL 1325635327. * following variable is initialized to base unix epoch time value */ĭEFINE VARIABLE vDateOrDateTime AS DATETIME NO-UNDO INITIAL.

These time values can easily be converted into ABL DATE or DATETIME values using the following code: Unix Epoch time values are a mechanism for describing instants in time, defined as the number of seconds elapsed since midnight (UTC) of January 1, 1970.
