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

Is it Daylight Savings Time ?

I found out that I can only set an offset in my session timezone
in my ISP's MySQL server, not a timezone. So I am left with the
task of setting the offset, which will vary, depending on whether
or not DST is in effect.

Is there a way of discovering, from a PHP script is we are in DST
or standard time ?

bill
Oct 25 '07 #1
3 1785
bill wrote:
I found out that I can only set an offset in my session timezone in my
ISP's MySQL server, not a timezone. So I am left with the task of
setting the offset, which will vary, depending on whether or not DST is
in effect.

Is there a way of discovering, from a PHP script is we are in DST or
standard time ?

bill
if(date("I") == 1)
{
//daylight saving time
}
else
{
//not daylight saving time
}

Whether this is accurate (in light of the recent change in the
definition of DST) is up to your server.

Jeremy
Oct 26 '07 #2
Greetings, Jeremy.
In reply to Your message dated Friday, October 26, 2007, 04:43:12,

Jif(date("I") == 1)
J{
J //daylight saving time
J}
Jelse
J{
J //not daylight saving time
J}

JWhether this is accurate (in light of the recent change in the
Jdefinition of DST) is up to your server.

Don't forget to set date.timezone to client timezone before checking that.
--
Sincerely Yours, AnrDaemon <an*******@freemail.ru>

Oct 26 '07 #3
AnrDaemon wrote:
Greetings, Jeremy.
In reply to Your message dated Friday, October 26, 2007, 04:43:12,

Jif(date("I") == 1)
J{
J //daylight saving time
J}
Jelse
J{
J //not daylight saving time
J}

JWhether this is accurate (in light of the recent change in the
Jdefinition of DST) is up to your server.

Don't forget to set date.timezone to client timezone before checking that.

yeah, that is the problem, my ISP will only allow setting the
timezone offset, not the timezone.

I'll get around that.
Oct 26 '07 #4

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

Similar topics

3
by: Bathroom_Monkey | last post by:
For posterity's sake, here is an algorithm I created to take a GMT time and convert it to U.S. central time, accounting for daylight saving time. Note: this algorithm can be modified to work for...
2
by: hourang | last post by:
ok im getting tired of looking for an answer and coming up short with scripts that dont work. i have a application that uses GMT for all its times and needs the clients timeoffset for showing the...
1
by: Ernie | last post by:
I am creating an .ics file that when opened (via Outlook) inserts a meeting into the calendar. All works fine unless the date and time I'm inserting happens to occur on the hour the time changes...
10
by: Marc Pelletier | last post by:
Hello, I am writing an application that does some simple astronomical calculations. One of the variables I need is the number of hours passed in this year. I've written the following function ...
3
by: chrisdevey | last post by:
Is there any way to make a System.Timers.Timer adjust for daylight savings time change? In a long running process I set a timer as follows for a daily expiration: _myTimer = new...
3
by: Anna | last post by:
Hi, I've already found out that .Net Framework 1.1 does not properly handle anything that is related to a non-current timezone. Since my project should be released before the release of...
3
by: mmuras | last post by:
I did not see any discussions / threads for this but if there is one please let me know: -First, I am one of only two individuals within my company's IT Dept. -We have a Windows Server 2003 R2...
4
by: Polaris431 | last post by:
I have a web application in ASP.NET that will be used globally. Data is collected on mobile devices running Windows Mobile and sent to the web server where it is stored and can be viewed. Data is...
3
by: Generic Usenet Account | last post by:
Hi, Is there any way to make time-of-day adjustments for daylight savings using only standard time functions? We have a program that executes daily at a fixed time of day. After daylight...
27
by: RobG | last post by:
I was investigating a function to determine whether daylight saving was being observed on a particular date (given the platform's regional settings) and came across a suggestion at merlyn.com to...
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...
0
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...
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...
1
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...
1
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.