[Red5] Red5 Internationalization (i18n)

Manuel Raña info at vengava.com
Mon Dec 1 17:04:09 PST 2008


I guess this could be solved converting the server time to some global time
format and send it to the client and let the client convert that global time
to it's local time.

but it seems not red5 related, the're gonna put us away from the list :)


2008/12/2 Tyler Kocheran <rfkrocktk at gmail.com>

> I can't seem to figure this out. What would make sense is to get the right
> timezone'd Calendar instance via
> Calendar.getInstance(TimeZone.getTimeZone("GMT-0:00"));, but this doesn't
> get me a Calenar of a different timezone, rather the same one.
>
>
> On Mon, Dec 1, 2008 at 4:31 PM, Tyler Kocheran <rfkrocktk at gmail.com>wrote:
>
>> I've looked into that. It differs not in the milliseconds or seconds, but
>> in hours. So it's definitely a time-zone based thing. I still need to figure
>> out the whole UTC thing on the serverside in Java, that's what I'm trying to
>> deduce right now.
>>
>> On Mon, Dec 1, 2008 at 4:25 PM, Manuel Raña <info at vengava.com> wrote:
>>
>>> Maybe this:
>>> new Date(Date.UTC(yrs, mths, days, hrs, secs, millis)) == new Date()
>>>
>>> returns false since the secs and millis have already changed?
>>>
>>>
>>>
>>> 2008/12/2 Tyler Kocheran <rfkrocktk at gmail.com>
>>>
>>>> Thanks Manuel. I'm actually trying to understand how serialization and
>>>> deserialization of Date object works. I'm starting to understand things
>>>> about it through testing, but I'm still unclear on how to get UTC in Java.
>>>> Here are my findings so far.
>>>> Calling "new Date().getTime() ==
>>>> Calendar.getInstance().getTimeInMillis()" yields true when called on the
>>>> Java side. Evidently I was wrong about Dates being UTC by default.
>>>> On the Flash side, "new Date(Date.UTC(yrs, mths, days, hrs, secs,
>>>> millis)) == new Date()" yields false, which is what I expected.
>>>>
>>>> Now, I just need to figure out how to get the UTC date on the Java side
>>>> to persist, that way I can just have each client interpret the date to their
>>>> timezone in Flash. I'm probably going to write up an article on this one, so
>>>> we can all benefit from my experimenting. In the meantime, does anyone know
>>>> how to get the UTC time in Java? The Date.UTC method in Java is deprecated.
>>>>
>>>> On Mon, Dec 1, 2008 at 3:47 PM, Manuel Raña <info at vengava.com> wrote:
>>>>
>>>>> This url should show 00:48.... http://vengava.com/?ctr=webcam
>>>>> No webcam but...
>>>>>
>>>>>
>>>>> 2008/12/2 Manuel Raña <info at vengava.com>
>>>>>
>>>>> I've "implemented" some javascript remote time using formulas from
>>>>>> wikipedia taking in acount daylight saving time... SFMI*
>>>>>>
>>>>>> but i can't get the search term now :(())
>>>>>>
>>>>>> There's no cam in this crappy page (typos included) but should show
>>>>>> you the time from spain right now in javascript  (currently 00:43:00... from
>>>>>> here)
>>>>>>
>>>>>> i'll let you know if i find it!
>>>>>>
>>>>>>
>>>>>>
>>>>>> *SFMI (sorry for my enckglish he he he... )
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> 2008/12/2 Tyler Kocheran <rfkrocktk at gmail.com>
>>>>>>
>>>>>>>  How would I incorporate timezone internationalization into a Red5
>>>>>>> application? I mean, I understand the concept of Date objects in Java: Date
>>>>>>> objects represent actual time in milliseconds from 1970, without being
>>>>>>> adjusted for timezones. Calendar objects are what mess with timezones. I'm
>>>>>>> working with a Hibernate application and I'm unsure how I would send date
>>>>>>> objects back to the client. What would be the best way to do that? Do
>>>>>>> clients deserialize dates correctly on the Flash side in regards to
>>>>>>> milliseconds since 1970? It's kinda hard to test only having a local machine
>>>>>>> in the same timezone that I'm in. Any recommendations?
>>>>>>>
>>>>>>> Thanks,
>>>>>>>  - TK
>>>>>>>
>>>>>>> --
>>>>>>> And do this, knowing the time, that now it is high time to awake out
>>>>>>> of sleep;
>>>>>>> for now our salvation is nearer than when we first believed.
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Red5 mailing list
>>>>>>> Red5 at osflash.org
>>>>>>> http://osflash.org/mailman/listinfo/red5_osflash.org
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Red5 mailing list
>>>>> Red5 at osflash.org
>>>>> http://osflash.org/mailman/listinfo/red5_osflash.org
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> And do this, knowing the time, that now it is high time to awake out of
>>>> sleep;
>>>> for now our salvation is nearer than when we first believed.
>>>>
>>>> _______________________________________________
>>>> Red5 mailing list
>>>> Red5 at osflash.org
>>>> http://osflash.org/mailman/listinfo/red5_osflash.org
>>>>
>>>>
>>>
>>> _______________________________________________
>>> Red5 mailing list
>>> Red5 at osflash.org
>>> http://osflash.org/mailman/listinfo/red5_osflash.org
>>>
>>>
>>
>>
>> --
>> And do this, knowing the time, that now it is high time to awake out of
>> sleep;
>> for now our salvation is nearer than when we first believed.
>>
>
>
>
> --
> And do this, knowing the time, that now it is high time to awake out of
> sleep;
> for now our salvation is nearer than when we first believed.
>
> _______________________________________________
> Red5 mailing list
> Red5 at osflash.org
> http://osflash.org/mailman/listinfo/red5_osflash.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://osflash.org/pipermail/red5_osflash.org/attachments/20081202/1fb291ce/attachment-0001.html>


More information about the Red5 mailing list