Arduino-Due-RTC-Library icon indicating copy to clipboard operation
Arduino-Due-RTC-Library copied to clipboard

Summertime

Open Oegtsgeest opened this issue 9 years ago • 9 comments

Hi Markus, Great library ! Found little issue while checking the examples:

In the second and third example (Simple_German_Summertime and Simple_German_Timing_Summertime there is a difference. The Due_RTC.timing() function is called. Due_RTC.timing() function seems to be required to correctly return the summertime YES/NO value. In the CPP there is indeed a call for the meztime variable,(mez =CET for non German speaking !) which is set in the Due_RTC.timing() function. This explains why the Simple_German_Summertime.ino is not working correctly. You may want to change the Summertime() function to avoid calling the meztime variable.

Oegtsgeest avatar Mar 30 '15 10:03 Oegtsgeest

Thanks for the reply,

yes you are right there is something wrong, should remove the Due_RTC.timing() and change the Summertime() function to give the right value back without the need of the timing() function. Yeah and may I have to use only one language in the library for the variables, my bad. Thanks for showing me the issues in the library. ATM I have no DUE in my range may you can test the changes?

BR

Markus

On Mon, Mar 30, 2015 at 12:50 PM, Oegtsgeest [email protected] wrote:

Hi Markus, Great library ! Found little issue while checking the examples:

In the second and third example (Simple_German_Summertime and Simple_German_Timing_Summertime there is a difference. The Due_RTC.timing() function is called. Due_RTC.timing() function seems to be required to correctly return the summertime YES/NO value. In the CPP there is indeed a call for the meztime variable,(mez =CET for non German speaking !) which is set in the Due_RTC.timing() function. This explains why the Simple_German_Summertime.ino is not working correctly. You may want to change the Summertime() function to avoid calling the meztime variable.

— Reply to this email directly or view it on GitHub https://github.com/MarkusLange/Arduino-Due-RTC-Library/issues/3.

MarkusLange avatar Mar 30 '15 14:03 MarkusLange

Hi Markus, Thank you for your response. 1. Yes, I would be glad to test the changes on my Due Do not expect very high level comments,due to limited Arduino C experience, but I will certainly give it a try to test and come up with suggestions 2. A further remark on your library is the function Timezone. I do not quite understand this function. I saw it in the CPP file but not in the TXT file. What does this?

brgds

Oegtsgeest avatar Mar 30 '15 14:03 Oegtsgeest

Point 1. Thanks thats really nice Point 2. The function timezone is mostly usefull in use with the unixtime with the timezone you can shift the unixtime (is set to greenwich GMT-0) to your localtime so if you use the timezone parameter the timestamp get added or subtracted the difference to your timezone in seconds so that you get a "personal unixtime" to use

MarkusLange avatar Mar 31 '15 08:03 MarkusLange

Ok thx for your explanation. I'll wait for your new code to test

Oegtsgeest avatar Mar 31 '15 08:03 Oegtsgeest

So a new one is there.

MarkusLange avatar Apr 07 '15 21:04 MarkusLange

Hi Markus, 1.The "Simple_German_Summertime and Simple_German_Timing_Summertime" does not check for Summertime any more. After correcting this by using the old version of this file, your latest changes checked out well. Compliments. 2. I could not understand the dst_followup() function. It does not return a value. best regards

Oegtsgeest avatar Apr 08 '15 08:04 Oegtsgeest

Yes I deleted the old examples for the new one. The dst_followup() function is in use for the german summertime instead, this function checks the date and time and changed the clock if necessary when it goes from summer- to wintertime ot the other way. So I changed some minor things inside for the new function. Hope this does it better

MarkusLange avatar Apr 08 '15 08:04 MarkusLange

Hi Marcus,

You may like the timezone library by Christensen. this could make the library a whole lot more generic, as opposed to support for summertime for Germany only. :) https://github.com/JChristensen/Timezone

kapyaar avatar Jun 01 '15 00:06 kapyaar

Yeah youre fully right I was thinking the same, will take a closer look next time

MarkusLange avatar Jun 04 '15 21:06 MarkusLange