This gives the number of seconds offset from GMT. John DeSoi, Ph.D.
$zDate:=Current date $str:=String($zDate;ISO date GMT;$zTime) //2010-09-13T16:11:53Z $str:=Substring($str;1;Length($str)-1) //Remove the Z or it gives us back local time. $gmtDate:=Date($str) $gmtTime:=Time($str) Case of : ($zDate=$gmtDate) $0:=$zTime-$gmtTime : ($zDate>$gmtDate) $0:=(?24:00:00?-$gmtTime)+$zTime Else $0:=0-((?24:00:00?-$zTime)+$gmtTime) End case > On May 6, 2019, at 10:47 AM, Peter Jakobsson via 4D_Tech > <4d_tech@lists.4d.com> wrote: > > I’ve been looking into capturing the OS timezone (i.e. GMT +01 etc) from the > 4D language but have drawn a blank. I thought there might be some fancy > footwork with String(?00:00:00?;ISO GMT) or something trick like that > possible but I’ve been unsuccessful. > > Has anyone done this without resorting to LAUNCH EXTERNAL PROCESS shell > scripts and so on ? > ********************************************************************** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **********************************************************************