time zone 
Author Message
 time zone

Trying to set the time zone correctly in VWNC, but I can't seem
to get it right.  I'm in the eastern time zone, but when I
set the time zone (in the preferences area)  to this value, I get
incorrect times (image saved at 11:34 am instead of 4:34 pm).

I'm using Win 95, and the time zone is correctly set in the control
panel.  Is there some special offset I need
to use to make this work?

Ian



Wed, 18 Jun 1902 08:00:00 GMT  
 time zone
I'm not using the latest and greatest VW but my VW does not read the time
zone from the operating system.  The time zone has to be set in the image.
It seems to me there is a TimeZone class and there should be an example in
one of the class methods on how to set it.  The current time zone setting is
pacific since OBJS is out in California.

--tc


Quote:
> Trying to set the time zone correctly in VWNC, but I can't seem
> to get it right.  I'm in the eastern time zone, but when I
> set the time zone (in the preferences area)  to this value, I get
> incorrect times (image saved at 11:34 am instead of 4:34 pm).

> I'm using Win 95, and the time zone is correctly set in the control
> panel.  Is there some special offset I need
> to use to make this work?

> Ian



Wed, 18 Jun 1902 08:00:00 GMT  
 time zone
The relevant method is:
TimeZone class>>setDefaultTimeZone: aTimeZone

for examples, look at:  File->Settings->Time Zones from the Launcher)

"GMT; New York--Eastern Standard:"
    <TimeZone setDefaultTimeZone:
         (TimeZone
              timeDifference: -5
              DST: 1 at: 2
              from: 97 "on April 7"
              to: 304 "until October 31"
              startDay: #Sunday).>

now why the VisualWorks folks have chosen not to set it from the OS, I don't know.
maybe not all OSs did supply such information in the past?

Benny Sadeh

Quote:

> I'm not using the latest and greatest VW but my VW does not read the time
> zone from the operating system.  The time zone has to be set in the image.
> It seems to me there is a TimeZone class and there should be an example in
> one of the class methods on how to set it.  The current time zone setting is
> pacific since OBJS is out in California.

> --tc



> > Trying to set the time zone correctly in VWNC, but I can't seem
> > to get it right.  I'm in the eastern time zone, but when I
> > set the time zone (in the preferences area)  to this value, I get
> > incorrect times (image saved at 11:34 am instead of 4:34 pm).

> > I'm using Win 95, and the time zone is correctly set in the control
> > panel.  Is there some special offset I need
> > to use to make this work?

> > Ian



Wed, 18 Jun 1902 08:00:00 GMT  
 time zone


Quote:

> The relevant method is:
> TimeZone class>>setDefaultTimeZone: aTimeZone

> for examples, look at:  File->Settings->Time Zones from the Launcher)

> "GMT; New York--Eastern Standard:"
>     <TimeZone setDefaultTimeZone:
>          (TimeZone
>               timeDifference: -5
>               DST: 1 at: 2
>               from: 97 "on April 7"
>               to: 304 "until October 31"
>               startDay: #Sunday).>

> now why the VisualWorks folks have chosen not to set it from the OS, I don't know.
> maybe not all OSs did supply such information in the past?

The big problem is:  How does your computer store time?  I know that I
*can* get *a* time value from your computer, but what does it mean?

For instance, my Unix machines are all set (in the BIOS and unmodified
in the OS) to GMT (you know, "Internet Time" ;-).

But Windows does it differently....

I forget what the exact issues are, but they do exist.  But I do agree
that there *has* to be a better Way.  But the current way at least give
you an abstraction between the software and the hardware.

For this particular case, if you're running on Windows they you don't
need to set a timezone.  If you (Ian) look at your results, you see that
your image is reading the time as SystemTime - 5 hours.  Well, the time
that VW can read from the system *is* the SystemTime.  So, you want your
VW image to be in the GMT zone so that a 0 adjustment is made to the
SystemTime (BTW- this isn't a class, just a way of making the concept
into an "object").

Cheers,
pete

- Show quoted text -

Quote:
> Benny Sadeh


> > I'm not using the latest and greatest VW but my VW does not read the time
> > zone from the operating system.  The time zone has to be set in the image.
> > It seems to me there is a TimeZone class and there should be an example in
> > one of the class methods on how to set it.  The current time zone setting is
> > pacific since OBJS is out in California.

> > --tc



> > > Trying to set the time zone correctly in VWNC, but I can't seem
> > > to get it right.  I'm in the eastern time zone, but when I
> > > set the time zone (in the preferences area)  to this value, I get
> > > incorrect times (image saved at 11:34 am instead of 4:34 pm).

> > > I'm using Win 95, and the time zone is correctly set in the control
> > > panel.  Is there some special offset I need
> > > to use to make this work?

> > > Ian



Wed, 18 Jun 1902 08:00:00 GMT  
 time zone
I did set the time zone in the image to EST, following the
instructions.  There are sample expressions to do this
in the configuration area.
However, I assumed that that was just a translation layer
to read the time from the OS.

If not, would that not mean that you would have to enter a time
each time you started Smalltalk?

Ian

On Mon, 18 Oct 1999 02:40:04 -0400, "Taylor Corey"

Quote:

>I'm not using the latest and greatest VW but my VW does not read the time
>zone from the operating system.  The time zone has to be set in the image.
>It seems to me there is a TimeZone class and there should be an example in
>one of the class methods on how to set it.  The current time zone setting is
>pacific since OBJS is out in California.



Wed, 18 Jun 1902 08:00:00 GMT  
 time zone
Hi:

Quote:

> I did set the time zone in the image to EST, following the
> instructions.  There are sample expressions to do this
> in the configuration area.
> However, I assumed that that was just a translation layer
> to read the time from the OS.

> If not, would that not mean that you would have to enter a time
> each time you started Smalltalk?

No. It just means that you would have to set the time zone when you started
using a {*filter*} image.  That said, unless your software needs time zones for some
reason, you can ignore it.

Quote:

> Ian

> On Mon, 18 Oct 1999 02:40:04 -0400, "Taylor Corey"

> >I'm not using the latest and greatest VW but my VW does not read the time
> >zone from the operating system.  The time zone has to be set in the image.
> >It seems to me there is a TimeZone class and there should be an example in
> >one of the class methods on how to set it.  The current time zone setting is
> >pacific since OBJS is out in California.

--
Thanks!!

Joseph Bacanskas

--- Java, the best argument for Smalltalk since C++.



Wed, 18 Jun 1902 08:00:00 GMT  
 time zone
Ian,

"A TimeZone is used to convert a Time from Greenwich Mean Time (GMT) to
local time. A default TimeZone is used by the Time class to make such
conversions automatically. Some operating systems report local time rather
than GMT, and in such an environment a null TimeZone (available via #null)
is used.  Applications that rely on local time in some way must set the
default TimeZone (via #setDefaultTimeZone) each time the application is
opened on a different machine, perhaps as part of the application's
installation process. Applications that create an instance of Time in one
time zone and transport it to another time zone may need to create a
TimeZone representing the destination, and use #convertGMT:do: to convert
the time.  A TimeZone takes care of both the offset from GMT and the
adjustment for Daylight Saving Time. An instance is typically created by
sending #timeDifference:DST:at:from:to:startDay: to this class. That method
explains the conversion parameters that can be set."

You might try executing the following to activate the null time zone:

TimeZone setDefaultTimeZone: (TimeZone null).

Regards,

Randy
"Pair-programming is easier with multiple personalities"



Wed, 18 Jun 1902 08:00:00 GMT  
 time zone
It should have ocurred to me that windows might actually be storing
GMT.  Thanks for clearing it up Pete.

Ian

On Mon, 18 Oct 1999 10:21:29 -0500, Peter Hatch

Quote:

>For this particular case, if you're running on Windows they you don't
>need to set a timezone.  If you (Ian) look at your results, you see that
>your image is reading the time as SystemTime - 5 hours.  Well, the time
>that VW can read from the system *is* the SystemTime.  So, you want your
>VW image to be in the GMT zone so that a 0 adjustment is made to the
>SystemTime (BTW- this isn't a class, just a way of making the concept
>into an "object").



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

 Relevant Pages 

1. time zones, daylight saving time, and universal time

2. Time zone in MVS

3. How to make VW TimeZone use the system time zone automatically

4. Getting Dates with time Zone

5. Setting time zone

6. Programming in other time zone

7. API for Time Zone

8. Time Zones

9. Time zone information

10. Setting Time Zone for my scripts

11. Howto: Time Zone Adjustment?

12. Time Zones

 

 
Powered by phpBB® Forum Software