On 27/03/2008, Edwin Pratomo <[EMAIL PROTECTED]> wrote: > i don't think I fully understand your question. > but displaying time in certain timezone is fairly easy (in UNIX-based > system). > > $ ruby -e'p Time.now' > Thu Mar 27 18:28:12 +0700 2008 > > $ env TZ="US/Pacific" ruby -e'p Time.now' > Thu Mar 27 04:27:29 -0700 2008 > > is that you are asking about? if so, then I have saved your head :-)
No, what I want to get is only displaying what current UTC Time to be PST instead of also UTC. BTW my server is already UTC and I *don't* want to change its setting to be PST. Just imagine this scenario, one day a customer will say: "We need it to be based by Europe Paris instead of PST" [EMAIL PROTECTED] [~]# date Thu Mar 27 11:43:32 UTC 2008 I need to display something like if I say: Time.now.to_pst , will show PST, not UTC. I've read jamisbuck's post about tzinfo about deprecated and obsolete, and also rick's posts of Time.zone.now but I have no idea how to *get* Pacific Time (US & Canada) Time, I only know how to _set_ it. I even read one of jamisbuck blog comments saying that time and date implementation in Ruby should be changed # Nope, I'm not saying current implementation is good nor bad, I'm just frustrated I guess :(( My heads are still bleeding. Help... > rgds, > Edwin. -- blog: http://tinyurl.com/2bjgvn, ruby: http://www.ruby-lang.org/id/about I always thought Smalltalk would beat Java, I just didn't know it would be called 'Ruby' when it did. -- Kent Beck.

