March 19, 201411 yr Hi, I want to create a manual filemaker synchronization button for both relookup and update information in the server, desktop, and ios devices. If I use date and timestamp, would time difference in various part of the world be a factor of making mistakes in the synchronization? Is it possible to fix all the timestamp for all the devices the same even they are in different parts of the world? Thanks. Kent
March 20, 201411 yr FileMaker 13 introduced the Get ( CurrentTimeUTCMilliseconds ) function, which could spare you from casual timestamp processing during syncing. If you use GetAsTimestamp ( Get ( CurrentTimeUTCMilliseconds ) / 1000 ) for your record timestamps, you won't have to worry about converting timestamps between time zones during your sync processes, since each timestamp is presumably UTC. This does not account for the possibility of devices not correctly knowing what time zone they are in, but there's not much we can do about that. This also doesn't account for clock drift, but you can detect and compensate for that by comparing Get ( CurrentHostTimestamp ) and Get ( CurrentTimestamp ) when you sync (assuming you know what time zone both the host and client are in at the time of the sync, which you can determine by comparing Get ( CurrentTimeUTCMilliseconds ) with Get ( CurrentTimestamp )). You shouldn't need to use an additional date field, since a timestamp already includes the date.
Create an account or sign in to comment