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

Re: [MacPerl] Hi there, another newbie question



On Sun, 07 May 2000 22:26:18 +0000, Sveinbjorn Thordarson wrote:

>I live in Iceland but I run an Icelandic website on an American server. 
>I'm interested in using a server side include to display the time but
>localtime() displays American time and I'm interested in displaying
>Icelandic time (Greenwich Mean Time).  Is there a neat way I can make
>Perl display GMT instead of just date of the clock on the server?

Er... use gmtime() instead of localtime()?

If you add or subtract a number of seconds, 3600 per hour of time
difference, you can even trick it in producing your local time.

	print scalar gmtime(time + 7200); # CEST


Hmmm... from the mail header of your post, it looks like for you GMT ==
local time.

-- 
	Bart.

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