[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] changing the time returned by localtime



On Mon, Jan 17, 2000 at 07:09:16AM +1030, jakal wrote:
> Is there a simple way of changing the time returned by localtime; 
> 
> I am currently using $time = localtime(time); to get the time, which is 
> then output using print "$time"; and gives me something like "Mon Jan 
> 17 06:44:52 2000". 
> 
> which is the correct time according to the Australian server that it is 
> running on. The problem however is that almost all the users of the CGI 
> which generates the time will be in Europe, and it would make more 
> sense for the time to be about 10 hours ahead (or behind, I can't 
> remeber at the moment). Is there any easy one to do this? 
> 

If you want GMT, use gmtime().

(Much simpler than using localtime() and calculating the difference
yourself.  ;)

Ronald


# ===== Want to unsubscribe from this list?
# ===== Send mail with body "unsubscribe" to macperl-request@macperl.org