473,320 Members | 1,848 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

date_default_timezone_set() returns a 4-hour late time

I live in Brazil so I used the following script to return time:

<?
date_default_timezone_set('America/Sao_Paulo');
echo date('h:i:s');
?>

But it returns 7:30 while it's actually 11:30 here. I checked the
server time, and it is correct on the server. How could I return the
time of São Paulo? Thanks.

May 29 '07 #1
2 4299
>I live in Brazil so I used the following script to return time:
>
<?
date_default_timezone_set('America/Sao_Paulo');
echo date('h:i:s');
?>

But it returns 7:30 while it's actually 11:30 here. I checked the
server time, and it is correct on the server. How could I return the
time of São Paulo? Thanks.
Is the TIME ZONE set correctly on the server?

May 30 '07 #2
On May 29, 9:26 pm, gordonb.du...@burditt.org (Gordon Burditt) wrote:
Is the TIME ZONE set correctly on the server?
Yes it is. It's set to America/Sao_Paulo.

May 30 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: dan glenn | last post by:
hi. I want to code a 'preview' function into a guestbook entry page. I can do it with a button that posts, bringing up a whole new page showing a preview of what has been entered, and then the user...
5
by: lkrubner | last post by:
www.php.net says: >>>>>>>>>>>> Only for SELECT,SHOW,EXPLAIN or DESCRIBE statements mysql_query() returns a resource identifier or FALSE if the query was not executed correctly. For other type of...
23
by: rithish | last post by:
<code> var dt = new Date(2004, 0, 1); alert ( dt.getDate() ); // returns proper date alert ( dt.getUTCFullYear() ); // returns 2003 </code> Why is this so? Or is that I am missing...
4
by: ezra epstein | last post by:
Aother head banger for me. Below is a complete example of the code Using Postgres 7.4, the function "test" gets this: psql:temp3.sql:10: ERROR: syntax error at or near "%" at character 135...
1
by: Morten Nielsen | last post by:
Does anyone have any idea why I can't get a pixel-value of 255 returned in the code below? Any color-value from 0 up to 254 is returned correctly, but any color-component of 255 returns zero. ie....
5
by: Susan Geller | last post by:
Character returns stored in a table do not display in a textbox or on a datagrid on my .net form. The text displays without the returns making the text difficult to read. When I "view source" on...
8
by: TheDude5B | last post by:
Hi, I have some data which is stored in my MySQL database as TEXT. when the data is entered in, it has some carriage returns in it, and this can be seen when querying the data using MySQL Query...
10
by: Lyle Fairfield | last post by:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbaac11/html/acfctNZ_HV05186465.asp "If the value of the variant argument is Null, the Nz function returns the number zero or a...
4
by: Henning M | last post by:
Hej All Im relativ new to VB.net and im trying to collect som device information using cfgmgr32.dll I use - Declare Function GetListLength Lib "cfgmgr32.dll" Alias...
7
by: mattrapoport | last post by:
I have a page with a div on it. The div displays a user comment. When the user logs into this page, their current comment is pulled from a db and displayed in the div. The user can edit the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.