UTC (GMT) time in VisualAge 
Author Message
 UTC (GMT) time in VisualAge

I have posted several previous questions to this group and most have
gotten very fast responses.  This newsgroup is a good resource!

One I'm afraid I must draw on again.  I am writing a multi-threaded
VisualAge app. and wish to return the present time, formatted
"11-Nov-1998 14:15:16".  That I can do.

The catch is that I want the time in the UTC (formerly called GMT, or
Greenwich Mean Time) timezone.  However, the Date and Time classes
stubbornly insist on returning values in the *current* timezone.  What's
more, each formats its time by means of a Formatter class variable.  I
don't want to change that because I might do so just when another thread
is using it.  I could use semaphores but is there an easier way?  

I know that class OSCall has a #setThreadLocale: method.  But is that
supported on all platforms?  I develop on a Win95 box but the production
application runs under AIX.  Is this the right way to set the locale or
should I call another method?

And my confusion only begins there.  Even if I knew what method to call
(and there are lots of methods with "locale" in their names) I still
don't know what to pass to it.  I gather from pawing through source code
that a locale's name is a two-element array, e.g., #( 'english',
'britain').  Well, Greenwich is there so I suppose that's what I should
pass.  But I'm only guessing.

Does anyone have some insight into VisualAge timezone manipulation?  I
could solve the problem by moving to England but I'd miss the Southern
California sun.  :-)

--
James M. Stern                Northrop Grumman Corp.  Hawthorne, CA
Opinions expressed above are not necessarily my employer's.



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. UTC (GMT) time in VisualAge

2. GMT vs UTC

3. UTC time conversion to internal time

4. GMT time vs. local time

5. Time.utc problem with arrays?

6. Converting a time to UTC and displaying it

7. UTC equivalent of time.mktime() ?

8. gmt vs. labview daylight saving time XL

9. how to convert current time to gmt?

10. GMT Time

11. gmt time again

12. Getting GMT time

 

 
Powered by phpBB® Forum Software