Amar, (I am sorry for a mix up with your last name)

Maybe you are correct. My point is time zone and offset are two different
measures. You cannot calculate a time zone if you know an offset. But you can
calculate the offset if you know the time zone.

Maya

"Nanduri, Amarnath" wrote:

> Maya,
>
>       It all depends on your design and the project you are working on. Let
> me give you an example...
>
>         If lets say i have locations in different parts of the world and i
> want to reserve tickets for those Locations. I already know the timezone the
> Location is present (since a location can't change. If a Location changes
> then i have no answer and i leave it to the experts to answer that
> question). I simply store the offsets with reference to GMT in my database.
> If the user selects a particular Location i know the correct offset and
> timezone.
>
> Am i making sense ?
>
> Amar..
>
> -----Original Message-----
> From: Maya Muchnik [mailto:[EMAIL PROTECTED]]
> Sent: Friday, March 09, 2001 10:13 AM
> To: [EMAIL PROTECTED]
> Subject: Re: user time-zone
>
> Sorry folks, for this thread, because it does not "concerns" the struts
> directly (some designing issue).
>
> Nanduri,
>
> You can not consider an offset as a correct reference to time zone. For
> example, Cairo - has +2 hours from GMT, Helsinki - the same +2 hours, Israel
> -
> +2 hours. They are all in different time zones!
>
> Maya
>
> "Nanduri, Amarnath" wrote:
>
> >   Keep all the timezone offsets in a database. Send a hidden field to the
> > client which maps the region he/she is in (using Javascript ?). Depending
> on
> > the region, hit your database and get the time zone offset from your
> > database.
> >
> > cheers,
> > Amar..
> >
> > -----Original Message-----
> > From: Maya Muchnik [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, March 08, 2001 5:04 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: user time-zone
> >
> > I have got a response from my colleagues, that the time offset can not be
> > used
> > to establish correct time zone. The offset depends on a season and other
> > factors. A user can change a time zone through "Date/Time Properties"
> window
> > for NT. It means you need to ask the user what time zone he  / she wants
> to
> > use.
> >
> > Peter Alfors wrote:
> >
> > > oops,
> > > should be a lowercase 'z'
> > >
> > > getTimezoneOffset()
> > >
> > > Peter Alfors wrote:
> > >
> > > > I have not tried this yet, but according to the books, it should work.
> > > >
> > > > function getTimeZoneOffset()
> > > > {
> > > >   var date = new Date();
> > > >   var offset = date.getTimeZoneOffset();
> > > >   alert(offset);
> > > > }
> > > >
> > > > This is the offset (in minutes) from GMT/UTC.
> > > >
> > > > HTH,
> > > >     Pete
> > > >
> > > > Maya Muchnik wrote:
> > > >
> > > > > Please, provide a javascript code how to do this.
> > > > >
> > > > > Peter Alfors wrote:
> > > > >
> > > > > > It appears that the time-zone offset could be retrieved via
> > javascript
> > > > > > on a startup page, then entered in to the users session through an
> > > > > > action class / hidden field combo.
> > > > > >
> > > > > > Its ugly, but it would work.
> > > > > >
> > > > > > Any better ideas?

Reply via email to