[wxMac] wxDateTime question
Yoav Gonen
YoavG at HumanEyes.com
Tue Jun 5 03:04:23 PDT 2007
I just tried it (using xcode) and got this result:
Current time: Tue Jun 5 11:59:34 2007
And in PST: Tue Jun 5 00:59:34 2007
The difference: 11:00:00
My time zone is IDT.
Yoav
-----Original Message-----
From: Vadim Zeitlin [mailto:vadim at wxwidgets.org]
Sent: Monday, June 04, 2007 6:57 PM
To: wx-users at lists.wxwidgets.org
Subject: Re[2]: [wxMac] wxDateTime question
On Mon, 04 Jun 2007 18:28:31 +0200 H <H at h.com> wrote:
H> > % cat dt.cpp
H> > #include "wx/init.h"
H> > #include "wx/wxchar.h"
H> > #include "wx/string.h"
H> > #include "wx/datetime.h"
H> >
H> > int main()
H> > {
H> > wxInitializer init;
H> > if ( !init.IsOk() ) {
H> > printf("Failed to initialize wxWidgets.\n");
H> > return 1;
H> > }
H> >
H> > wxDateTime dt = wxDateTime::Now();
H> > wxPrintf(_T("Current time:\t%s\n"), dt.Format().c_str());
H> > wxDateTime dtPST = dt.ToTimezone(wxDateTime::PST);
H> > wxPrintf(_T("And in PST:\t%s\n"), dtPST.Format().c_str());
H> > wxPrintf(_T("The difference:\t%s\n"), (dt -
dtPST).Format().c_str());
H> >
H> > return 0;
H> > }
...
H> that's the result:
H>
H> Current time: Mon Jun 4 18:22:27 2007
H> And in PST: Mon Jun 4 17:22:27 2007
H> The difference: 01:00:00
For MESZ (a.k.a. CEST, or Central European Summer Time) this definitely
doesn't look right. Do you build using Xcode or command line tools? If
it's
latter I'll try to debug it myself but if it's the former I'd be really
grateful if someone else could do it instead, I hate using Xcode and
it's
dog slow on my Mac Mini.
Thanks,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: wx-users-unsubscribe at lists.wxwidgets.org
For additional commands, e-mail: wx-users-help at lists.wxwidgets.org
More information about the wx-users
mailing list