Finally i have parsed the data and displayed time on the 16x2 Display. But i've issue regarding how to add +5.30 Time zone for india to current UTC time. any idea from friends here would help me to save my time...
Its not just simple to add 5hour to hour register and 30 minutes to min ones.. because when it would be 23 hours + 5 means it will show 28...and that's mess. so how to overcome this issue..
Posted by JohanEkdahl: Fri. Jul 11, 2014 - 09:16 AM
1
2
3
4
5
Total votes: 0
Quote:
Its not just simple to add 5hour to hour register and 30 minutes to min ones..
I'll paraphrase resident 'freak David Prentice: Sit dow and do a few such additions on paper. Then think. Perhaps make a cup of tea. Then think again.
Then implement in a C function what you just did on paper.
As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here.
No guarantees, but if we don't report problems they won't get much of a chance to be fixed! Details/discussions at link given just above.
"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]
i am using Atmel Studio 6 with GCC compiler. i don't know whether it supports..?
It doesn't have it in the currently issued version but in the "next" version you should find the functions added. In the meantime you can "cherry pick" what you need from here:
Finally i have parsed the data and displayed time on the 16x2 Display. But i've issue regarding how to add +5.30 Time zone for india to current UTC time. any idea from friends here would help me to save my time...
Its not just simple to add 5hour to hour register and 30 minutes to min ones.. because when it would be 23 hours + 5 means it will show 28...and that's mess. so how to overcome this issue..
- Log in or register to post comments
TopSo you just handle the overflow from hours to days...
Top Tips:
- Log in or register to post comments
TopOne common method is to convert time to seconds add/subtract your offset then convert back to 'real' time. Its a common problem.
- Log in or register to post comments
TopDoes your compiler offer
- Log in or register to post comments
TopI'll paraphrase resident 'freak David Prentice: Sit dow and do a few such additions on paper. Then think. Perhaps make a cup of tea. Then think again.
Then implement in a C function what you just did on paper.
As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here.
No guarantees, but if we don't report problems they won't get much of a chance to be fixed! Details/discussions at link given just above.
"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]
- Log in or register to post comments
Topi am using Atmel Studio 6 with GCC compiler. i don't know whether it supports..?
- Log in or register to post comments
TopIt doesn't have it in the currently issued version but in the "next" version you should find the
http://svn.savannah.nongnu.org/v...
- Log in or register to post comments
TopIf you need the full date/time arithmetic - complete with days, months, leap years, etc - then you should use the functions.
If you just want a correct roll-over of the hours, then that's just simple arithmetic...
Top Tips:
- Log in or register to post comments
TopYes i just want time...so i will use simple asthmatics i have some idea will post once successful..
- Log in or register to post comments
TopFinally i have little success in converting simple arithmetic calculations.. as below
i have added +5.30 for Indian standard time
- Log in or register to post comments
TopPages