DST for USA

Begonnen von shooter, 11. April 2012, 12:36:21

Vorheriges Thema - Nächstes Thema

0 Mitglieder und 3 Gäste betrachten dieses Thema.

shooter

found this one on PLCS.NET
please enhance the DST code as we are having more customers in USA.


Been looking for us version all week.
http://www.webexhibits.org/daylightsaving/i.html
For the United States:
Begin DST: Sunday April (2+6*y-y/4) mod 7+1
End DST: Sunday October (31-(y*5/4+1) mod 7)
Valid for years 1900 to 2006, though DST wasn't adopted until the 1950s-1960s. 2007 and after:
Begin DST: Sunday March 14 - (1 + y*5/4) mod 7
End DST: Sunday November 7 - (1 + y*5/4) mod 7;
European Economic Community:
Begin DST: Sunday March (31 - (5*y/4 + 4) mod 7) at 1h U.T.
End DST: Sunday October (31 - (5*y/4 + 1) mod 7) at 1h U.T.
Since 1996, valid through 2099
(Equations by Wei-Hwa Huang (US), and Robert H. van Gent (EC))

mcmazie

Here is a module for DST US. Just import it in your Codesys library.

In the next release we will integrade this module directly into the oscat.lib.




[gelöscht durch Administrator]