What's happening is known as an XY problem. Literally in this case!
THEN WHAT WILL BE THE FUNCTION TO STORE THE rtc TIME THEN......
and once button is pressed we should not have to press it again....light should be on at the same time when button is pressed earlier and off at 12 automatically.
3rd function...same function as 2nd but it is for making the light off;;;;
i am using pushbutton to switch between these functions
For any time based s/w I still prefer to use unix epoch based time. With something like the Time library, you get the flexibility of using either form of time and can convert back and forth if/when necessary.
You are trying to kill an ant with a howitzer.And the TimeAlarms libraries are almost certainly more trouble than just writing the thing from scratch.
And I am sure that this is all Greek to the OP.
Why even use an Arduino? Why not just use one of these?http://www.homedepot.com/p/Intermatic-15-Amp-Plug-In-Lamp-and-Appliance-Timer-White-TN111K/205478759
Quote from: odometerAnd I am sure that this is all Greek to the OP.This I believe. And I'm guessing that this is the #1 reason that most people will shy away from using epoch based time tracking.They are not grasping the concept and its usefulness.