[wxMac] wxDateTime question
H
H at h.com
Tue Jun 5 14:05:13 PDT 2007
In article
<1575652CC19A124CA7138837DB3E2D6A5E0218 at gulliver.HumanEyes.com>,
YoavG at HumanEyes.com ("Yoav Gonen") wrote:
> 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
>
>
Probably one of the settings in XCode is messed up again. I will have a
look at it. Thanks!
Hartwig
> -----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
More information about the wx-users
mailing list