OSCAT Forum

oscat.lib => oscat.lib fuer TwinCAT/CoDeSys => Thema gestartet von: shooter am 11. April 2012, 12:36:21

Titel: DST for USA
Beitrag von: shooter am 11. April 2012, 12:36:21
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))
Titel: Re: DST for USA
Beitrag von: mcmazie am 29. Juni 2012, 13:16:06
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]