473,473 Members | 2,073 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Website showing wrong time

170 New Member
Hi,

My php website is showing the wrong time. I don't think it's a timezone thing. The website is running purely on my local machine under localhost. It's around 10 hours slow, which means when I login this morning, Monday morning, the date shows up as Sunday still.

In my php.ini file, I have

date.timezone = Australia/Hobart

But I'm wondering whether there's some other setting I'm not aware of.

Can anyone help?

Thanks
Apr 10 '11 #1
3 3415
abhishekmiet
8 New Member
U may include this line before you use any date related function.....
Expand|Select|Wrap|Line Numbers
  1. <?php
  2.      date_default_timezone_set('Australia/Hobart');
  3. ?>
  4.  
hope it will help..good luck.....
Apr 12 '11 #2
beary
170 New Member
Thanks. I discovered that even though I had a pph.ini file in the root folder, php wasn't looking at that file. I changed the main ini file and it worked fine.
Apr 12 '11 #3
abhishekmiet
8 New Member
but without changing your php.ini in such cases in which you don't have access to php.ini you may use the script described by me above.......
Apr 12 '11 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Jonatan Fernstad | last post by:
I am using the JavaMail API to send email. It seems the Message.setSentDate(new Date()) sets wrong time zone. I am at GMT+1, and this is also what the new Date() is showing. But when the...
5
by: RICHARD BROMBERG | last post by:
I am writing an ASP program that includes a Form. When the Form is submitted I use the Date() and Time() functions to put the date and time into the Body part of the e-mail. The time reported is...
6
by: robin9876 | last post by:
In an Access 97 (and 2000) database that has linked tables to Oracle which is showing some fields as text when they are numbers in Oracle. In Oracle they are specified to a size e.g. Number(38)....
1
by: sangitaraj | last post by:
Hello, I have created a website in ASP.net 2.0 and published it on the webserver. The following error message is displayed. Compiler Error Message: CS0246: The type or namespace name...
2
by: Joanna Carter [TeamB] | last post by:
Hi folks If I write a KeyDown handler and check the KeyCode for Keys.Insert, the debugger shows the value as Keys.LButton | Keys.MButton | Keys Back | Keys.Space. This is perfectly...
1
by: William Sullivan | last post by:
I've got a website that may, on occasion, display a large list of items in a bulletedlist control. On the client side, it takes about 4 seconds to get a response that weighs in at over 1mb. It...
0
by: GJH | last post by:
Hi, I have created a page that downloads a vCalendar to a visitor. If the person logs on from somewhere other than EST their times are incorrect. for example, someone in Colorado accesses the page...
0
by: news.orange.nl | last post by:
Hi! I'm looking for resources on howto get public folder data from MS exchange. More specifically, i'd like to show a certain catagory of contacts on our website, thus preventing double work. ...
4
by: sierra7 | last post by:
Hi all I have a situation where I have an existing form that has funcioned well for years but is giving a problem running in Access 2010. There are two combo boxes in the header of a form, which set...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.