On 11/07/2013 03:02 PM, alex lupu wrote:
<much snipping>
A sample output:
[]% date
Thu Nov 7 13:05:10 EST 2013
<more snipping>
Note: the time change (DST to EST) was effected at 2AM, Nov. 3 here,
whereby everybody had to move their clocks one hour back - like to 1AM.
When I got to the end of your post and you wondered about a "simple"
<if> command, my mind went right back to these two statements. This is
also just a "gut reaction" to your post and not thought out. (I'm
taking a break from trying to make my new LFS bootable in an efi
environment.)
You could test $DATE to see if it's between Nov 3 01:59:59 and Mar
<whatever> 01:59:59. Let's say the start date is time1 and the end date
time2 then you could say:
if $DATE >= time1 -a <= time2; then
tz=EST (or UTC-5) #however you can write that to make bash understand
else
tz=EDT (or UTC-4) #same caveat
fi
And then use $tz however you do in your wrapper.
Hopefully, this might lead you down a path to resolve your dilemma and
stop global warming.
Dan
--
http://linuxfromscratch.org/mailman/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page