Le 03/02/2013 10:28, Ian Haywood a écrit : > On Sun, Feb 3, 2013 at 7:11 PM, Kevin Fishburne > <kevinfishbu...@eightvirtues.com> wrote: > \ > >> The date/time is sent/received as a float and stays synchronized. The >> problem is (as you say) when the float is converted to a string the time >> zone is applied. I need a way to print >> >> Format$(CDate(DateCurrent), "mmmm d, yyyy, hh:nn:AM/PM") >> >> without the time zone being applied, or with a specific TZ applied. >> "DateCurrent" is the float. I'm trying not to custom create a calendar >> and complicate Format$ with it, but specify a time zone. The server is >> fine, but the client applies local TZ and DST rules and fouls the >> formatting of Format$. >> >> Hope that makes sense, and thanks. > presumably the float is seconds since epoch or similar.
Yes. Epoch is a virtual date about 10000 years before now. > so calculate the difference between the local time and server time in seconds > and subtract it from the float value before display, this > "counteracts" the time zone > adjustment applied by the client OS > > Ian > To get the current timezone, you do Round(Frac(Date(Now)) * 24). Then you can use this value to convert a date to/from UTC. Regards, -- Benoît Minisini ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_jan _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user