473,385 Members | 1,798 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,385 software developers and data experts.

Setting the environment variable for timezones ...

So I can't figure out what exactly is going wrong here ... I'm using
php4.3
I'm accessing a server in Dublin from Seoul. I need to be able to
translate times into various timezones across the world. Simple
addition isn't the best because it doesn't take into account Daylight
Saving Times etc ....

What I'm doing is setting the TZ environment variable to my preferred
timezone and then calling a date function to get the hour ...

putenv("TZ=EST");
echo date('G');

.... unfortunately it doesn't work and I don't know why.
TZ is definitely set when I call my date function ... but it always
returns dublin time regardless of the TZ environment variable .... ?

Help ...

Apr 3 '06 #1
1 1810

dbee wrote:
putenv("TZ=EST");
echo date('G');


This works for me on PHP 4.3.4, 4.4.2 and 5.1.2 on Linux.

Apr 3 '06 #2

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

Similar topics

3
by: Brian Neumann | last post by:
I just installed jdk2 release 1.4.1 and I set the variables under User environment variables as Variable: JAVA Value: C:\j2sdk1.4.1\bin but when i got into the dos prompt using cmd via the run...
2
by: Rick Kasten | last post by:
Here's what I need to do: 1) Write "Password:" to the console - I know how to do that 2) Accept input that is not written back to the console - I know how to do that (Term::ReadKey) 3) Set the...
3
by: Rahul S. | last post by:
Hey all: I need urgent information how to set the environment in Visual.NET wiritng in C. I am working with a licensed version of the Analyze 6.0 software from mayo clinic. I need to write...
6
by: shaan.shaan | last post by:
Hi I am trying to set an env. variable by exporting in unix environment on DB2. I am using export var_name=ON, but it is not taking the value of the var_name. This thing is working fine when I...
1
by: laredotornado | last post by:
Hi, I'm using PHP 4.4.4 on Apache 2 on Fedora Core 5. PHP was installed using Apache's apxs and the php library was installed to /usr/local/php. However, when I set my "error_reporting"...
8
by: Jack Vamvas | last post by:
I know that you can do : Request.ServerVariables("QUERY_STRING") but can you actually set a serverVariable? I know that sounds counter intuitive , but is it possible, via vbscipt/asp? -- ...
5
by: Henaro | last post by:
Hello~ I am having trouble setting environment variables in C++ on win32. The code that is not working is: char prxy; char pf_cmd1 = "set http_proxy="; ....
27
by: Sanjay | last post by:
Hi All, I am using pytz.common_timezones to populate the timezone combo box of some user registration form. But as it has so many timezones (around 400), it is a bit confusing to the users. Is...
2
by: Qu | last post by:
Hi everyone. The short version: I need a way to change the currently active process at run-time. The long version: I need to get a directory path out of an external application. The only way...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.