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
LostMyLove
Forum Newbie
Posts: 20 Joined: Mon Sep 27, 2004 12:20 pm
Post
by LostMyLove » Thu Sep 30, 2004 8:41 pm
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?
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Thu Sep 30, 2004 9:01 pm
can you speak english?
post some code.
LostMyLove
Forum Newbie
Posts: 20 Joined: Mon Sep 27, 2004 12:20 pm
Post
by LostMyLove » Thu Sep 30, 2004 9:09 pm
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 )
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Thu Sep 30, 2004 9:13 pm
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 » Fri Oct 01, 2004 4:47 pm
can u give me an example?
i don't get the message of the manual :/
hard to understand
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Fri Oct 01, 2004 4:57 pm
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 » Fri Oct 01, 2004 5:03 pm
Joe
Forum Regular
Posts: 939 Joined: Sun Feb 29, 2004 1:26 pm
Location: UK - Glasgow
Post
by Joe » Fri Oct 01, 2004 7:28 pm
What the hell is that picture all about. I think a moderator should remove that!
John Cartwright
Site Admin
Posts: 11470 Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:
Post
by John Cartwright » Sat Oct 02, 2004 12:58 am
I had a good laugh, and may it be a warning for people that ask TOOOOOO many questions without trying things out
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 » Sat Oct 02, 2004 2:54 am
Finally, somebody with a sense of humor
Just did a google image search for "gun".
John Cartwright
Site Admin
Posts: 11470 Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:
Post
by John Cartwright » Sat Oct 02, 2004 9:30 am
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 » Sat Oct 02, 2004 4:46 pm
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.