# Patch for bug 29334 Daylight Savings Win32

- Thread: https://externals.io/message/14391
- Original archive: https://news-web.php.net/php.internals/14391
- Started by Carter on 2005-01-14T08:52:12+00:00
- Messages: 3
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #14391 — Carter — 2005-01-14T08:52:12+00:00

URL: https://externals.io/message/14391#14391

Hi,

This bug's been open a while (since July). I placed a small patch in the comments in October (repeated below); can someone review and commit please?

John.

patch to win32 sendmail.c:

--- old.c	2004-09-08 21:33:17.640625000 +0100
+++ new.c	2004-09-08 21:39:06.890625000 +0100
@@ -684,6 +684,7 @@
 	}
 	zoneh /= (60 * 60);
 	zonem = (abs(_timezone) / 60) - (zoneh * 60);
+	zoneh += tm->tm_isdst;
 
 
 	if(!xheaders || !strstr(headers_lc, "date:")){


John Carter
Developer, Integro project
Royal London
(44) 1625 605735
john.carter@royal-london.co.uk



The contents of this e-mail are confidential and for the addressee only.
If you are not the addressee you should not print, copy or distribute
this e-mail or use it or its contents or copy or publish its contents
to any other person.  If you have received this e-mail in error please
notify us and delete it from your system.

The Royal London Mutual Insurance Society Limited for life and pension
products. Registered in England No. 99064. Registered Office: 
55 Gracechurch Street, London, EC3V 0RL. Royal London Asset Management Limited
for investment management services. Registered in England No. 2244297.
Registered Office: 55 Gracechurch Street, London, EC3V 0UF.
Royal London Savings Limited for Individual Savings Accounts.
Registered in England No. 3642633. Registered Office: 55 Gracechurch Street, 
London, EC3V 0RL. Royal London Unit Trust Managers Limited
for unit trusts. Registered in England No. 2372439.
Registered Office: 55 Gracechurch Street, London, EC3V 0UF.
All these companies are authorised and regulated by the Financial Services Authority.

---

## #14395 — Derick Rethans — 2005-01-15T16:59:19+00:00

URL: https://externals.io/message/14391#14395 · In reply to: #14391

> This bug's been open a while (since July). I placed a small patch in
> the comments in October (repeated below); can someone review and
> commit please?

It looks OK, but I can't try it as I don't use Windows.

Derick

-- 
Derick Rethans
http://derickrethans.nl | http://ez.no | http://xdebug.org

---

## #14420 — Jani Taskinen — 2005-01-24T04:44:24+00:00

URL: https://externals.io/message/14391#14420 · In reply to: #14391

This "fix" is not very ideal considering this note about tm_isdst property:

       "Positive value if daylight saving time is in effect; 0 if daylight
       saving time is not in effect; negative value if status of daylight
       saving time is unknown. If the TZ environment variable is set, the C
       run-time library assumes rules appropriate to the United States for
       implementing the calculation of daylight-saving time (DST)."

     In case the status of dst is unknown, you'd be removing 1 or more
     hours from the time..

     --Jani

     p.s. I removed this patch from the bug report.




> Hi,
>
> This bug's been open a while (since July). I placed a small patch in the comments in October (repeated below); can someone review and commit please?
>
> John.
>
> patch to win32 sendmail.c:
>
> --- old.c	2004-09-08 21:33:17.640625000 +0100
> +++ new.c	2004-09-08 21:39:06.890625000 +0100
> @@ -684,6 +684,7 @@
> 	}
> 	zoneh /= (60 * 60);
> 	zonem = (abs(_timezone) / 60) - (zoneh * 60);
> +	zoneh += tm->tm_isdst;
>
>
> 	if(!xheaders || !strstr(headers_lc, "date:")){
>
>
> John Carter
> Developer, Integro project
> Royal London
> (44) 1625 605735
> john.carter@royal-london.co.uk
>
>
>
> The contents of this e-mail are confidential and for the addressee only.
> If you are not the addressee you should not print, copy or distribute
> this e-mail or use it or its contents or copy or publish its contents
> to any other person.  If you have received this e-mail in error please
> notify us and delete it from your system.
>
> The Royal London Mutual Insurance Society Limited for life and pension
> products. Registered in England No. 99064. Registered Office:
> 55 Gracechurch Street, London, EC3V 0RL. Royal London Asset Management Limited
> for investment management services. Registered in England No. 2244297.
> Registered Office: 55 Gracechurch Street, London, EC3V 0UF.
> Royal London Savings Limited for Individual Savings Accounts.
> Registered in England No. 3642633. Registered Office: 55 Gracechurch Street,
> London, EC3V 0RL. Royal London Unit Trust Managers Limited
> for unit trusts. Registered in England No. 2372439.
> Registered Office: 55 Gracechurch Street, London, EC3V 0UF.
> All these companies are authorised and regulated by the Financial Services Authority.
