On 3/8/07, Raj Mathur <[EMAIL PROTECTED]> wrote:
> On Thursday 08 March 2007 21:35, Manish Popli wrote:
> > see i wrote this..but i m getting diffrence 0 instead 5..
> > difference shoud be five..
>
> I have no clue what you're trying to do, but if you just want to find
> out the offset between GMT and your current timezone, there are
> easier ways to do it.  Since I prefer Perl, here's one way:
>
> perl -MDate::Calc -e '@x=Date::Calc::Timezone;printf "%02d:%02d\n",
> $x[3],$x[4];'
>

And if the OP prefers python -

python -c "from datetime import datetime; print (datetime.now() -
datetime.utcnow());"

Don't know perl so can't say if the outputs are equivalent.

Regards,
Anupam Jain

_______________________________________________
ilugd mailinglist -- ilugd@lists.linux-delhi.org
http://frodo.hserus.net/mailman/listinfo/ilugd
Archives at: http://news.gmane.org/gmane.user-groups.linux.delhi 
http://www.mail-archive.com/ilugd@lists.linux-delhi.org/

Reply via email to