Unix_Date ( current_timestamp ; time_zone_offset )
Calculates the Unix Epoch Date
Average rating: 4.2 (32 votes) Log in to vote
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
Calculates the Unix timestamp, which is the number of seconds from 1/1/1970. If you use FileMaker's Get (CurrentTimeStamp) function to send the timestamp to the Unix_Date function, make sure you set the time_zone_offset to your local time zone (-5 is EST, -4 is EDT). Setting time_zone_offset to 0 (zero) will treat the timestamp as GMT.
Feel free to email me at firstname.lastname@example.org with comments or corrections.
|Kevin Vile, Ohio
Jul 20, 2010
|A simpler method that accomplishes the same purpose (unless I am missing something) is as follows (where _timestamp and _hourOffset are the function parameters):
min = GetAsTimestamp ( Date ( 1 ; 1 ; 1970 ) ) ;
max = GetAsTimestamp ( Date( 7 ; 8 ; 2038 ) )
If ( _timestamp ≥ min and _timestamp ≤ max;
GetAsNumber ( _timestamp ) - GetAsNumber ( min ) - ( _hourOffset * 3600 )
Jan 5, 2012
|Can you use this unix epoch date to regenerate an accurate timestamp?
My understanding is: Unix Epoch dates do not account for leap seconds.
Aug 15, 2018
|Could this be used to put in a people file, and then when you go to that person's record, it tells you what time it is for them locally?
That's what I'm looking for. It seems like it should be easy.
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.