({{, (RefLink[FromUnixTime, paclet:ref/FromUnixTime])[time] 
gives a date object corresponding to a (RefLink[UnixTime, paclet:ref/UnixTime]) specification.}})

OpenersNotesSection(Spacer1)Details and Options

(RefLink[FromUnixTime, paclet:ref/FromUnixTime])[time] returns a (RefLink[DateObject, paclet:ref/DateObject]) expression based on the number of seconds time that have elapsed since {1970, 1, 1, 0, 0, 0.} Greenwich Mean Time (GMT), not counting leap seconds.

(RefLink[FromUnixTime, paclet:ref/FromUnixTime])[time,(RefLink[TimeZone, paclet:ref/TimeZone])->z] generates a (RefLink[DateObject, paclet:ref/DateObject]) expression with time zone z. The default value is (RefLink[$TimeZone, paclet:ref/$TimeZone]).

OpenersPrimaryExamplesSection(Spacer1)Examples  (6)

OpenersExampleSection0(Spacer1)Basic Examples  (2)

Create a (RefLink[DateObject, paclet:ref/DateObject]) expression from a Unix time specification:

FromUnixTime[1423155963]

Get the start date for Unix time, expressed in the GMT time zone:

FromUnixTime[0,TimeZone->0]

OpenersExampleSection1(Spacer1)Options  (1)

OpenersExampleSubsection0(Spacer1)TimeZone  (1)

Specify the time zone for the output (RefLink[DateObject, paclet:ref/DateObject]) expression:

FromUnixTime[36000,TimeZone->-5]

OpenersExampleSection2(Spacer1)Properties & Relations  (2)

(RefLink[FromUnixTime, paclet:ref/FromUnixTime]) converts from Unix time into a (RefLink[DateObject, paclet:ref/DateObject]) expression:

FromUnixTime[1500000000]

(RefLink[UnixTime, paclet:ref/UnixTime]) converts back into Unix time form:

UnixTime[%]

If Unix time was stored in a signed 32-bit integer, then it would cover a period of about 136 years:

FromUnixTime/@{-2^31,2^31}

UnitConvert[Apply[DateDifference,%],"Years"]

(RefLink[FromUnixTime, paclet:ref/FromUnixTime]) can work with much larger integers:

FromUnixTime[2^100]

OpenersExampleSection3(Spacer1)Possible Issues  (1)

By default, (RefLink[FromUnixTime, paclet:ref/FromUnixTime]) returns results in your (RefLink[$TimeZone, paclet:ref/$TimeZone]):

date = FromUnixTime[1422970200]

For a historical value of a time stamp in a given location at a given time, (RefLink[LocalTime, paclet:ref/LocalTime]) can be used:

LocalTime[LinguisticAssistant,date]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[UnixTime, paclet:ref/UnixTime])  ▪  (RefLink[AbsoluteTime, paclet:ref/AbsoluteTime])  ▪  (RefLink[DateList, paclet:ref/DateList])  ▪  (RefLink[DateString, paclet:ref/DateString])  ▪  (RefLink[DateObject, paclet:ref/DateObject])  ▪  (RefLink[JulianDate, paclet:ref/JulianDate])  ▪  (RefLink[FromJulianDate, paclet:ref/FromJulianDate])  ▪  (RefLink[FromAbsoluteTime, paclet:ref/FromAbsoluteTime])  ▪  (RefLink[DateValue, paclet:ref/DateValue])  ▪  (RefLink[Now, paclet:ref/Now])  ▪  (RefLink[SessionTime, paclet:ref/SessionTime])  ▪  (RefLink[TimeUsed, paclet:ref/TimeUsed])  ▪  (RefLink[Clock, paclet:ref/Clock])  ▪  (RefLink[AbsoluteTiming, paclet:ref/AbsoluteTiming])  ▪  (RefLink[Timing, paclet:ref/Timing])  ▪  (RefLink[TimeZone, paclet:ref/TimeZone])  ▪  (RefLink[$TimeUnit, paclet:ref/$TimeUnit])}})}})

({{DocumentationFooterIconsRelatedTutorial.png, ({{Tutorials}, {▪(RefLinkPlain[Date and Time Functions, paclet:tutorial/DateAndTimeFunctions])}, {▪(RefLinkPlain[Global System Information, paclet:tutorial/GlobalSystemInformation])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Date & Time, paclet:guide/DateAndTime])}})}})