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

Pro-rata Billing in Periodic Billing for Rental
Hi guys,

We have a situation, where a rental contract starts at the mid of the month say

BI in Upstream Production operations
Appreciate if you can assist in the following areas:
1) Examples of life before and after BI i

Auto fill in input value based on User_ID
Hello,

I'm looking form some input on the following problem.

User loads page ->

Operator precedence assistance.
I did a quick Google search and couldn't quite find the answer I wanted in terms I could understand,

Renaming a file that a user uploads to site?
My site allows for registered users to upload images to the site under their own gallery. Currently

Snapshot from video
anyone knw how to make a snapshot maker from avi n mkv format.
for example if i give a direct lin

Adding Outlook 2007 items via file upload
I am looking for a way to be able to attach an Outlook item (an email message) in an ASP.NET 3.5 app

How to implement HTTP connection timeout
Hi All,I would like to implement an HTTP connection timeout.

I am working on a application wh

How would I do "Users not logged in since *** delete them"
I know how I would set this up, and delete the user roughly.
I'll create a table called "Use

Using insert variable
need a way to inert variable data to mysql database

$acc = "212121212";
$nok =

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