[wxMac] wxDateTime question
H
H at h.com
Tue Jun 5 14:03:45 PDT 2007
In article <F0PZHD.A.PdD.zREZGB at brage.sunsite.dk>,
vadim at wxwidgets.org (Vadim Zeitlin) wrote:
> 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
Hi,
I use XCode and I also hate it as it is too buggy. But in general I
think that gcc and libtools sucks because compiling and linking from the
command line is also not faster.
Hartwig
More information about the wx-users
mailing list