[PHP] timezone

2013-04-15 Thread Larry Martell
I have a client that has an app the runs with PHP 5.1.6. They want to upgrade to 5.3.3. First issue I ran into, they have a line of code that is: $deftz = date(T); I'm getting this for that line: [Mon Apr 15 10:44:16 2013] [error] [client 10.7.14.21] PHP Warning: date(): It is not safe to rely

Re: [PHP] timezone

2013-04-15 Thread Jonathan Sundquist
On Mon, Apr 15, 2013 at 12:14 PM, Larry Martell larry.mart...@gmail.comwrote: I have a client that has an app the runs with PHP 5.1.6. They want to upgrade to 5.3.3. First issue I ran into, they have a line of code that is: $deftz = date(T); I'm getting this for that line: [Mon Apr 15

Re: [PHP] timezone

2013-04-15 Thread Larry Martell
On Mon, Apr 15, 2013 at 11:17 AM, Jonathan Sundquist jsundqu...@gmail.com wrote: On Mon, Apr 15, 2013 at 12:14 PM, Larry Martell larry.mart...@gmail.com wrote: I have a client that has an app the runs with PHP 5.1.6. They want to upgrade to 5.3.3. First issue I ran into, they have a line

Re: [PHP] timezone

2013-04-15 Thread Ashley Sheridan
You don't know which timezone the server is in? That's what it wants. Larry Martell larry.mart...@gmail.com wrote: On Mon, Apr 15, 2013 at 11:17 AM, Jonathan Sundquist jsundqu...@gmail.com wrote: On Mon, Apr 15, 2013 at 12:14 PM, Larry Martell larry.mart...@gmail.com wrote: I have a

Re: [PHP] timezone

2013-04-15 Thread Larry Martell
On Mon, Apr 15, 2013 at 11:33 AM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: You don't know which timezone the server is in? That's what it wants. No, I don't - this app runs in different locations all over the world. Larry Martell larry.mart...@gmail.com wrote: On Mon, Apr 15, 2013

Re: [PHP] timezone

2013-04-15 Thread Larry Martell
On Mon, Apr 15, 2013 at 11:35 AM, Larry Martell larry.mart...@gmail.com wrote: On Mon, Apr 15, 2013 at 11:33 AM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: You don't know which timezone the server is in? That's what it wants. No, I don't - this app runs in different locations all over

Re: [PHP] timezone

2013-04-15 Thread Lester Caine
Larry Martell wrote: No, I don't - this app runs in different locations all over the world. I found some code at php.net that does this: date_default_timezone_set(@date_default_timezone_get()); $deftz = date('T'); And that is working for me and giving me what I need. But do you ACTUALLY

Re: [PHP] timezone

2013-04-15 Thread Larry Martell
On Mon, Apr 15, 2013 at 1:59 PM, Lester Caine les...@lsces.co.uk wrote: Larry Martell wrote: No, I don't - this app runs in different locations all over the world. I found some code at php.net that does this: date_default_timezone_set(@date_default_timezone_get()); $deftz = date('T');

Re: [PHP] timezone

2013-04-15 Thread Maciek Sokolewicz
On 15-4-2013 22:12, Larry Martell wrote: On Mon, Apr 15, 2013 at 1:59 PM, Lester Caine les...@lsces.co.uk wrote: Larry Martell wrote: No, I don't - this app runs in different locations all over the world. I found some code at php.net that does this:

Re: [PHP] timezone

2013-04-15 Thread Larry Martell
On Mon, Apr 15, 2013 at 2:57 PM, Maciek Sokolewicz maciek.sokolew...@gmail.com wrote: On 15-4-2013 22:12, Larry Martell wrote: On Mon, Apr 15, 2013 at 1:59 PM, Lester Caine les...@lsces.co.uk wrote: Larry Martell wrote: No, I don't - this app runs in different locations all over the world.

Re: [PHP] timezone

2013-04-15 Thread Maciek Sokolewicz
On 15 April 2013 23:06, Larry Martell la...@software-horizons.com wrote: But UCT is not the timezone. When this app runs in New Mexico (where I am) it's Mountain time. When it runs in NY it's Eastern. When it runs in Tokyo it's JST, etc. The user has the option of setting the timezone all

Re: [PHP] timezone

2013-04-15 Thread Stuart Dallas
On Mon, Apr 15, 2013 at 10:06 PM, Larry Martell la...@software-horizons.com=mailto:la...@software-horizons.com; wrote: On Mon, Apr 15, 2013 at 2:57 PM, Maciek Sokolewicz wrote: On 15-4-2013 22:12, Larry Martell wrote: On Mon, Apr 15, 2013 at 1:59 PM, Lester Caine wrote: Larry Martell

[PHP] timezone math problem.

2010-09-16 Thread Paul Halliday
I have the following: #!/usr/local/bin/php ?php $offset = date(Z); $sDate = '2010-09-16'; $sTime = '00:00:00'; $eDate = '2010-09-17'; $eTime = '00:00:00'; $tmpStart0 = date($sDate $sTime); $tmpEnd0 = date($eDate $eTime); $startDate = date(Y-m-d H:i:s,strtotime($tmpStart0 . - . $offset seconds));

[PHP] Timezone details

2009-07-03 Thread Manoj Singh
Hi All, Is there any function in PHP which will provide me the details of any timezone such as current time, DST, offset etc. Thanks in advance, Manoj

Re: [PHP] Timezone details

2009-07-03 Thread Michael A. Peters
Manoj Singh wrote: Hi All, Is there any function in PHP which will provide me the details of any timezone such as current time, DST, offset etc. Thanks in advance, Manoj It's called date http://php.net/manual/en/function.date.php The manual page on the function tells you how to get all

[PHP] PHP timezone is unstable...

2009-03-09 Thread Dirk
Hello, what could cause the timezone in PHP to, randomly, jump back and forth 6 hours now and then? from phpinfo(): date date/time support enabled Olson Timezone Database Version 0.system Timezone Database internal Default timezone America/Chicago DirectiveLocal Value

[PHP] PHP timezone is unstable...

2009-03-09 Thread Dirk
Hello, what could cause the timezone in PHP to, randomly, jump back and forth 6 hours now and then? from phpinfo(): date date/time support enabled Olson Timezone Database Version 0.system Timezone Database internal Default timezone America/Chicago DirectiveLocal Value

[PHP] Re: PHP timezone is unstable...

2009-03-09 Thread Nathan Rixham
Dirk wrote: Hello, what could cause the timezone in PHP to, randomly, jump back and forth 6 hours now and then? from phpinfo(): date date/time support enabled Olson Timezone Database Version 0.system Timezone Database internal Default timezone America/Chicago Directive

Re: [PHP] Re: PHP timezone is unstable...

2009-03-09 Thread Dirk
Nathan Rixham wrote: Dirk wrote: Hello, what could cause the timezone in PHP to, randomly, jump back and forth 6 hours now and then? from phpinfo(): date date/time support enabled Olson Timezone Database Version 0.system Timezone Database internal Default timezone

Re: [PHP] Re: PHP timezone is unstable...

2009-03-09 Thread Nathan Rixham
Dirk wrote: Nathan Rixham wrote: Dirk wrote: Hello, what could cause the timezone in PHP to, randomly, jump back and forth 6 hours now and then? from phpinfo(): date date/time support enabled Olson Timezone Database Version 0.system Timezone Database internal Default

Re: [PHP] Re: PHP timezone is unstable...

2009-03-09 Thread Dirk
Nathan Rixham wrote: Dirk wrote: Nathan Rixham wrote: Dirk wrote: Hello, what could cause the timezone in PHP to, randomly, jump back and forth 6 hours now and then? from phpinfo(): date date/time support enabled Olson Timezone Database Version 0.system Timezone Database

Re: [PHP] Re: PHP timezone is unstable...

2009-03-09 Thread Dirk
Nathan Rixham wrote: Dirk wrote: Nathan Rixham wrote: Dirk wrote: Hello, what could cause the timezone in PHP to, randomly, jump back and forth 6 hours now and then? from phpinfo(): date date/time support enabled Olson Timezone Database Version 0.system Timezone Database

Re: [PHP] Timezone management

2008-03-12 Thread Jim Lucas
Lamonte H wrote: After a while of studying different softwares, I've still been getting confused on how to make a timezone management script to display time in different time zones. Like right now im in -0600 CST GMT, how would I create a script that would work on any server that would allow

Re: [PHP] Timezone management

2008-03-12 Thread Daniel Brown
On Wed, Mar 12, 2008 at 10:50 AM, Jim Lucas [EMAIL PROTECTED] wrote: Lamonte H wrote: After a while of studying different softwares, I've still been getting confused on how to make a timezone management script to display time in different time zones. Like right now im in -0600 CST

[PHP] Timezone management

2008-03-11 Thread Lamonte H
After a while of studying different softwares, I've still been getting confused on how to make a timezone management script to display time in different time zones. Like right now im in -0600 CST GMT, how would I create a script that would work on any server that would allow me to display my

[PHP] Timezone DB update frequency

2007-05-21 Thread Rob Desbois
I am responsible for development of a product using PHP, which is distributed as a component of the product. How often does the timezone DB (php_timezonedb.dll) actually *need* to be updated? We would be responsible for this task via product updates so need to know if the default DB shipped with

Re: [PHP] Timezone DB update frequency

2007-05-21 Thread Crayon Shin Chan
On Monday 21 May 2007 19:33, Rob Desbois wrote: How often does the timezone DB (php_timezonedb.dll) actually *need* to be updated? Whenever jurisdictions around the world change their time? -- Crayon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Timezone offset

2007-03-29 Thread Seak, Teng-Fong
Chris wrote: Seak, Teng-Fong wrote: UK's timezone is GMT (+) while most other western European countries like Spain, France, Germany, etc are in GMT +1000. I'm sure you mean +0100 - +10 is Australia and other places ;) Oh yes, of course +0100 instead of +1000. Mistyping on the

Re: [PHP] Timezone offset

2007-03-28 Thread Tijnema !
On 3/28/07, Chris Boget [EMAIL PROTECTED] wrote: My server's timezone is set to (GMT) Greenwish Mean Time : Dublin, Edinburgh, Lisbon, London. But when I echo out date( 'O' ), it's returning the offset as +0100 and not +. Why? I would think that it should return +. Am I wrong? thnx,

Re: [PHP] Timezone offset

2007-03-28 Thread Zoltán Németh
2007. 03. 28, szerda keltezéssel 10.24-kor Chris Boget ezt írta: My server's timezone is set to (GMT) Greenwish Mean Time : Dublin, Edinburgh, Lisbon, London. But when I echo out date( 'O' ), it's returning the offset as +0100 and not +. Why? I would think that it should return

Re: [PHP] Timezone offset

2007-03-28 Thread Chris Boget
On 3/28/07, Chris Boget [EMAIL PROTECTED] wrote: My server's timezone is set to (GMT) Greenwish Mean Time : Dublin, Edinburgh, Lisbon, London. But when I echo out date( 'O' ), it's returning the offset as +0100 and not +. Why? I would think that it should return +. Am I wrong?

Re: [PHP] Timezone offset

2007-03-28 Thread Tijnema !
On 3/28/07, Chris Boget [EMAIL PROTECTED] wrote: On 3/28/07, Chris Boget [EMAIL PROTECTED] wrote: My server's timezone is set to (GMT) Greenwish Mean Time : Dublin, Edinburgh, Lisbon, London. But when I echo out date( 'O' ), it's returning the offset as +0100 and not +. Why? I would

Re: [PHP] Timezone offset

2007-03-28 Thread Satyam
- Original Message - From: Chris Boget [EMAIL PROTECTED] My server's timezone is set to (GMT) Greenwish Mean Time : Dublin, Edinburgh, Lisbon, London. There you have why, you set it to GreenwiSh, which is kind of Greenwich but not quite. I think that being on the western end of

Re: [PHP] Timezone offset

2007-03-28 Thread Satyam
@lists.php.net Sent: Wednesday, March 28, 2007 4:35 PM Subject: Re: [PHP] Timezone offset On 3/28/07, Chris Boget [EMAIL PROTECTED] wrote: My server's timezone is set to (GMT) Greenwish Mean Time : Dublin, Edinburgh, Lisbon, London. But when I echo out date( 'O' ), it's returning the offset

[PHP] Timezone offset

2007-03-28 Thread Chris Boget
My server's timezone is set to (GMT) Greenwish Mean Time : Dublin, Edinburgh, Lisbon, London. But when I echo out date( 'O' ), it's returning the offset as +0100 and not +. Why? I would think that it should return +. Am I wrong? thnx, Chris -- PHP General Mailing List

Re: [PHP] Timezone offset

2007-03-28 Thread Seak, Teng-Fong
Satyam wrote: - Original Message - From: Chris Boget [EMAIL PROTECTED] My server's timezone is set to (GMT) Greenwish Mean Time : Dublin, Edinburgh, Lisbon, London. There you have why, you set it to GreenwiSh, which is kind of Greenwich but not quite. I think that being on the

Re: [PHP] Timezone offset

2007-03-28 Thread Tijnema !
On 3/28/07, Seak, Teng-Fong [EMAIL PROTECTED] wrote: Satyam wrote: - Original Message - From: Chris Boget [EMAIL PROTECTED] My server's timezone is set to (GMT) Greenwish Mean Time : Dublin, Edinburgh, Lisbon, London. There you have why, you set it to GreenwiSh, which is kind of

Re: [PHP] Timezone offset

2007-03-28 Thread Chris
Seak, Teng-Fong wrote: Satyam wrote: - Original Message - From: Chris Boget [EMAIL PROTECTED] My server's timezone is set to (GMT) Greenwish Mean Time : Dublin, Edinburgh, Lisbon, London. There you have why, you set it to GreenwiSh, which is kind of Greenwich but not quite. I think

Re: [PHP] Timezone and DST

2006-01-06 Thread M
Mark Steudel wrote: Hi All, I've got a little problem where our servers are in PST but the customer operates in Hawaii (-10 GMT). I believe I can just get the time for them by doing something like date(d H i, strtotime('now -2 hours') ); But here's the catch, how should I deal with day

[PHP] Timezone and DST

2006-01-05 Thread Mark Steudel
Hi All, I've got a little problem where our servers are in PST but the customer operates in Hawaii (-10 GMT). I believe I can just get the time for them by doing something like date(d H i, strtotime('now -2 hours') ); But here's the catch, how should I deal with day light savings ( DST) . In

Re: [PHP] Timezone and DST

2006-01-05 Thread Mike Tuller
Are you just displaying the time, or is this for submission in a database? On Jan 5, 2006, at 12:50 PM, Mark Steudel wrote: Hi All, I've got a little problem where our servers are in PST but the customer operates in Hawaii (-10 GMT). I believe I can just get the time for them by doing

RE: [PHP] Timezone and DST

2006-01-05 Thread Mark Steudel
Im just using it to set defaults on a QuickForm date element. -Original Message- From: Mike Tuller [mailto:[EMAIL PROTECTED] Sent: Thursday, January 05, 2006 11:02 AM To: Mark Steudel Cc: php-general@lists.php.net Subject: Re: [PHP] Timezone and DST Are you just displaying the time

Re: [PHP] Timezone and DST

2006-01-05 Thread Mike Tuller
- From: Mike Tuller [mailto:[EMAIL PROTECTED] Sent: Thursday, January 05, 2006 11:02 AM To: Mark Steudel Cc: php-general@lists.php.net Subject: Re: [PHP] Timezone and DST Are you just displaying the time, or is this for submission in a database? On Jan 5, 2006, at 12:50 PM, Mark

Re: [PHP] Timezone and DST

2006-01-05 Thread Chris Boget
I've got a little problem where our servers are in PST but the customer operates in Hawaii (-10 GMT). I believe I can just get the time for them by doing something like date(d H i, strtotime('now -2 hours') ); But here's the catch, how should I deal with day light savings ( DST) . In hawaii

[PHP] Timezone date/time conversion

2005-08-01 Thread Chris Boget
I'm sure something like this has already been written and I'd hate to redesign the wheel. I've searched google but came up empty and am wondering if any of you guys have what I am looking for. Basically I need a function that will convert a time from one time zone to another. Such that if I

Re: [PHP] Timezone date/time conversion

2005-08-01 Thread Chris Boget
I'm sure something like this has already been written and I'd hate to redesign the wheel. I've searched google but came up empty and am wondering if any of you guys have what I am looking for. I ended up writing my own. Hopefully to help anyone else out trying to do the same thing, I've

[PHP] Timezone

2004-10-27 Thread Victor C.
Is there a way to get PHP to display the full name of time zone? date(t) only displays in the format of 'EDT', 'PDT', etc.. But I need the full name of the timezone, ie. Pacific daylight saving time. I know I can hard code all of these using switch statemetns. I'm just wondering if there is a

[PHP] Timezone and time() and date()

2004-01-07 Thread Manuel Vázquez Acosta
Hi all: How does the timezone of the server affects the behavior of the functions time and date. Manu. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Timezone and time() and date()

2004-01-07 Thread Richard Davey
Hello Manuel, Wednesday, January 7, 2004, 5:48:27 PM, you wrote: MVA How does the timezone of the server affects the behavior of the functions MVA time and date. Quite simply, if you don't provide date() with a timestamp then it will use the local servers timestamp instead. This will be

[PHP] Timezone functions?

2003-06-30 Thread Mark McCulligh
I am working on a project that I have to convert the date/time to different timezone include daylight saving time (DST). This project will be on a Windows server for a lot of the functions I have found on PHP.net don't work right. I am storing all the dates on the database in GMT time, thus I

Re: [PHP] timezone problem

2002-05-21 Thread Baba Buehler
Miguel Cruz wrote: In short, I believe it's an OS rather than a PHP thing. time zones can be a messy and tricky beast. all the PHP functions rely on the underlying OS implementation of time zone information. sometimes this is controlled by the TZ environment variable, sometimes it is

RE: [PHP] timezone problem

2002-05-21 Thread SP
: Re: [PHP] timezone problem Miguel Cruz wrote: In short, I believe it's an OS rather than a PHP thing. time zones can be a messy and tricky beast. all the PHP functions rely on the underlying OS implementation of time zone information. sometimes this is controlled by the TZ environment

Re: [PHP] timezone problem

2002-05-21 Thread Christopher Riordan
as different things depending where they live. I can do a dump if people would like Chris Riordan http://www.hal-9000.net - Original Message - From: SP [EMAIL PROTECTED] To: Baba Buehler [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, May 21, 2002 12:47 PM Subject: RE: [PHP] timezone

RE: [PHP] timezone problem

2002-05-21 Thread SP
PROTECTED]] Sent: May 21, 2002 1:05 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] timezone problem I had a similar issue, for a thing I'm doing for a Messageboard I am writing I need the timezones and offsets, so I compiled the best I could off different sites and info, and created a Mysql Table

[PHP] timezone problem

2002-05-20 Thread SP
I am trying to convert date/times to different timezones using putenv but I am having problems using the right TZ names. I am trying the zones I found here http://fuck.org/~ryan/squirrel/timezone/timezones. php but it seems the only ones that work are EST5EDT, CST6CDT, MST7MDT, PST8PDT and GMT.

Re: [PHP] timezone problem

2002-05-20 Thread Miguel Cruz
I think these are system-specific. You'll probably have to check which time zone your machine understands. For instance, on this FreeBSD machine there are hundreds of them in /usr/share/zoneinfo but on other machines there are only a handful. In short, I believe it's an OS rather than a PHP

RE: [PHP] timezone problem

2002-05-20 Thread SP
PROTECTED] Subject: Re: [PHP] timezone problem I think these are system-specific. You'll probably have to check which time zone your machine understands. For instance, on this FreeBSD machine there are hundreds of them in /usr/share/zoneinfo but on other machines there are only a handful

RE: [PHP] timezone problem

2002-05-20 Thread Miguel Cruz
On Mon, 20 May 2002, SP wrote: i'm testing on a windows so not sure where the timezone info would be but what you are saying that if i port my app to a unix box then it would be easy to just add the missing timezones in /usr/share/zoneinfo, right? if that's the case then i could just test