GMT TIME help!

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
LostMyLove
Forum Newbie
Posts: 20
Joined: Mon Sep 27, 2004 12:20 pm

GMT TIME help!

Post by LostMyLove »

i was tring to make an script, that users(was registred in script, the members) set the time with his GMT local to works for all peoples was visiting his site..

but i don't get it to works

can someone help me?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

can you speak english? :P

post some code.
LostMyLove
Forum Newbie
Posts: 20
Joined: Mon Sep 27, 2004 12:20 pm

Post by LostMyLove »

i don't have the codes, because nones i tried works...

i just want to make time to work in GMT (and user can selected the offset of it (-12 to 12 )
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

well.. having a real good look at the time functions, low and behold, this showed up: [php_man]gmmktime[/php_man]
LostMyLove
Forum Newbie
Posts: 20
Joined: Mon Sep 27, 2004 12:20 pm

Post by LostMyLove »

can u give me an example?
i don't get the message of the manual :/

hard to understand
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

how hard is it to search?

[big_search]gmmktime[/big_search]
denlou
Forum Newbie
Posts: 17
Joined: Fri Sep 24, 2004 7:11 pm
Location: Richmond/Vancouver, BC
Contact:

Post by denlou »

Image
User avatar
Joe
Forum Regular
Posts: 939
Joined: Sun Feb 29, 2004 1:26 pm
Location: UK - Glasgow

Post by Joe »

What the hell is that picture all about. I think a moderator should remove that!
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

I had a good laugh, and may it be a warning for people that ask TOOOOOO many questions without trying things out :P you get the pillow treatment
denlou
Forum Newbie
Posts: 17
Joined: Fri Sep 24, 2004 7:11 pm
Location: Richmond/Vancouver, BC
Contact:

Post by denlou »

Finally, somebody with a sense of humor ;)

Just did a google image search for "gun".
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

denlou wrote:Finally, somebody with a sense of humor ;)

Just did a google image search for "gun".
Just don't make throwing in random pictures a habbit.
JasonMichael
Forum Newbie
Posts: 8
Joined: Fri Sep 24, 2004 1:19 pm

Post by JasonMichael »

Here you go:

Code: Select all

<?php
function jmr_get_time ($zone) {
		$zone=3600*$zone;//-5 for EAstern USA / -4 for Eastern Day Time USA
		$datetime=gmdate("Y-d-m H:i:s", time() + $zone); // modify the format however you want it.
		return $datetime; 
}
?>
Hope that helps.
Post Reply