[Gambas-user] forcing time zone localization
Ian Haywood
ihaywood at ...1979...
Sun Feb 3 10:28:04 CET 2013
On Sun, Feb 3, 2013 at 7:11 PM, Kevin Fishburne
<kevinfishburne at ...1887...> 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.
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
More information about the User
mailing list