thanks so much, Ken! I’ll take a look at that nice component!
I realize I had apparently statically set the timezone to GMT?
Maybe I did this for my database??
I had this in my app constructor
static {
// Set default time zones
//TimeZone.setDefault(TimeZone.getTimeZone("GMT"));
//NSTimeZone.setDefaultTimeZone(NSTimeZone.getGMT());
}
once I noticed those two line and commented them out, general <wo:str>’s zapped
into a correct timezone on display - my component is another story but--
now I wonder if I’ll be storing my dates differently in the database?
do you have any such constructors?
On Jul 8, 2013, at 1:44 PM, Ken Anderson <[email protected]> wrote:
> Jesse,
>
> I've used the attached a while ago - it's a WO component that grabs the
> timezone offset from the other side.
>
> Ken
>
> <ClientTimeZone.zip>
>
> On Jul 8, 2013, at 1:08 PM, Jesse Tayler <[email protected]> wrote:
>
>>
>> thanks Ramsey! That’s the one folks were just talking about and it looks
>> great.
>>
>> I realize I’ve likely made my component wrong for this — here’s a look at
>> the idea attached —
>>
>> set the date, pick a time and duration.
>>
>> on the back of that UI, I used a lot of gregorian units and I likely should
>> have just requested a format, and used the return value instead of this:
>>
>> int hourOfDay = myCalendar.get(GregorianCalendar.HOUR_OF_DAY);
>>
>> something more like create a formatter, set it to just %h or whatever, set
>> the timezone and use that return value populate my UI?
>>
>> have another suggestion?
>>
>>
>>
>>
>>
>>
>> <Screen Shot 2013-07-08 at 1.03.38 PM.png>
>>
>>
>> On Jul 8, 2013, at 12:24 PM, Ramsey Gurley <[email protected]> wrote:
>>
>>> Assuming javascript is enabled on the client and you are using component
>>> actions, ERXTimeZoneDetector.
>>>
>>> Just providing a popup menu to let the user select it seems to be the most
>>> unbreakable approach. Maybe use the time zone detector in your page wrapper
>>> and if JS is disabled, then provide the popup when it really matters.
>>>
>>> On Jul 8, 2013, at 8:54 AM, Jesse Tayler wrote:
>>>
>>>>
>>>> what’s the best way to identify the timezone of a web user so my custom
>>>> date setting component can show the right times?
>>>>
>>>>
>>>> _______________________________________________
>>>> Do not post admin requests to the list. They will be ignored.
>>>> Webobjects-dev mailing list ([email protected])
>>>> Help/Unsubscribe/Update your Subscription:
>>>> https://lists.apple.com/mailman/options/webobjects-dev/rgurley%40smarthealth.com
>>>>
>>>> This email sent to [email protected]
>>
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list ([email protected])
>> Help/Unsubscribe/Update your Subscription:
>> https://lists.apple.com/mailman/options/webobjects-dev/kenlists%40anderhome.com
>>
>> This email sent to [email protected]
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [email protected]