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
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

php/mysql problem
Hey all,

Problem: im trying to setup a shop where people can use a drop-down list to select t

User feedback after MySQL query has been executed
Hi all, I've just registered on PHPFreaks because I've got a question that I simply can't work out b

Grouping and sorting results
Please help with this query.

I have 2 tables in a database, countires and cities. states look

Could Someone Please Debug This?
I was wondering if someone could debug this script for me. I realize it's not the tidest script (and

Problem with HTTP Caching...?
Hi there, im trying to implement caching. But it doesn't always work.
I post it here because ther

what business processes?
Hi,

A general question. What business processes (like OTC - Order to Cach, P2P, R2R etc)

Please help understand this code
I noticed the index page on my site was modified this morning and found this code inserted at the bo

ASP.NET Validation Event Cycle
Hi,
I have asp button as follow:

Last Weeks sDate and eDate.
sDate - Start Date
eDate - End Date

I need to pull two dates for "Last Week" whi

limitations on array_unique()
Does any one know what/how imitations are applied to array_unique? I have an issue where no matter h

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