timezone change with date()


Posted on 16th Feb 2014 07:03 pm by admin

so i put all my times for posts in my made from scratch forum(not phpbb3 or sm)
in my mysql db using the time()
and when i show the time on webpages i use the date('ymd/h:i:s', $time) kind of thing.
now the default timezone is America/New_York for php or whatever
Did you know?Explore Trending and Topic pages for more stories like this.
but IM GOING to make a thing upon registering on my site that the user choses what timezone they are in.

now i have two questions.
1. arent there only 24 different timezone hours? (i know theres more names than that.. but does anyone know of 24 main ones so i can get all the zones but not have to have all the cities etc..

2. since im going to be storing the users timezone pick in a mysql db, im going to put their timezone pick in a session variable and then echo it into whatever way im displaying the time or at least i hope i can do that.. so is there someway i can do that.. to show the time in a certain timezone(the choice of the user that ill put in the session var)
?

any help?
No comments posted yet

Your Answer:

Login to answer
100 Like 40 Dislike
Previous forums Next forums
Other forums

Socket Server Response Headers
Earlier I had a post about my Socket Server, I wasn't able to get it to connect, now I can

I

Data storage spaces in varchar2
Trying to understand what's happening.
I am selecting a value from a table that is defined as c

error checking breaking my code
Hi there, OK first of all, big apologies for what I assume is really fundamental errors in the struc

Material Issuing for receiving batch
Dear All experts in MM/ PP,

Material issuing from main stores to factory is currently usi

upload only text files
hi guys i want to upload only text like like (pdf,note pad and ofiice files) so can any one please t

PHP Display Telephone Number On Referrer
I have used the php below to show a different telephone number in the header of the site depending u

Typedef struct vs just struct
Anyone know the rationale for using typedef for structs when a struct is itself a typedef? I have s

Undefined variables
hi
----------------------------------------------------------------------------------------------

pagination numbering pattern
Hello,

I have following code which works great for pagination. but i have small issue now.

mail()
Hi all. I have a problem with emails. I am trying to set up a mail system where customers can subscr

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash