Hi,
I have a string like: "2012-10-24T23:59:00.000 +05:30"
I want to modify the above string into different time Zone.
I have written a shell script, but it is not working properly.
lSearchValueDat eTime='2012-10-24T23:59:00.000 +05:30'
lSearchDateTime HmsZone=`echo $lSearchValueDa teTime|cut -c1-23`
lModDateTimeHms Ms=`date +%FT%T.%N -d $lSearchDateTim eHmsZone|cut -c1-23` lModZone=`date +%:z -d $lModDateTimeHm sMs`
NewDateTime=${l ModDateTimeHmsM s}${lModZone}
echo $NewDateTime
O/P: 2012-10-24T18:59:00.000 +02:00
O/P should come like: 2012-10-24T20:29:00.000 +02:00
Please help me to get the appropriate result.
~Thanks
I have a string like: "2012-10-24T23:59:00.000 +05:30"
I want to modify the above string into different time Zone.
I have written a shell script, but it is not working properly.
lSearchValueDat eTime='2012-10-24T23:59:00.000 +05:30'
lSearchDateTime HmsZone=`echo $lSearchValueDa teTime|cut -c1-23`
lModDateTimeHms Ms=`date +%FT%T.%N -d $lSearchDateTim eHmsZone|cut -c1-23` lModZone=`date +%:z -d $lModDateTimeHm sMs`
NewDateTime=${l ModDateTimeHmsM s}${lModZone}
echo $NewDateTime
O/P: 2012-10-24T18:59:00.000 +02:00
O/P should come like: 2012-10-24T20:29:00.000 +02:00
Please help me to get the appropriate result.
~Thanks
Comment