If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Yes, it is.
I should have mentioned this happens under wxMSW 2.6.3 (and 2.6.2), but works fine under wxGTK 2.6.3.
The strange thing is that it's off just for the very first call and then works as expected. With a badly set up locale I'd assume a permanent shift.
I tried tracing the differences between the two. I didn't see anything glaringly wrong but the path is slightly complicated to trace. wxDateTime uses the default copy constructor so I doubt the issue is there. The first main difference I would think would be that the first one creates a wxDateTime instance then Now() is called versus the latter which calls Now then creates the instance. I don't immediately see why this would be a problem. I looked into Format() and my first thought was it had something to do with GetTimeZone() in datetime.cpp but it doesn't appear to care whether a wxDateTime instances has been created, it has its own static member variable it uses to determine whether the time zone has been established yet so the ordering of Now() and construction doesn't appear to matter (if it is, indeed a problem with GetTimeZone()).
I'll ping Vadim on the mailing list (he wrote these classes) and see what he thinks.
I've just tried it here (VC7.1, HEAD) and it works as expected. I'm not in
UTC-9 of course, but I'm not in UTC neither... I have really no idea why it
doesn't work for two of you.
I suspect you may have to break out the debugger if you want to get to the bottom of the issue. I'm a bit overloaded here or else I'd give it an attempt.