linux - Python is not able update the time according to selected timezone in inux -


python not able update time according selected timezone in inux.

i have python code trying print time in iso format using python date time module in below code.

{  import datetime  current_time = datetime.datetime.now().isoformat()  print current_time  } 

i trying run code in startup script of linux. have set time zone in linux utc-05:30. still getting "current_time" in utc , not in utc-05:30. "current_time" lags behind system time 05:30 hours. sure why python not able use system time during boot up. please let me know know issue.

my problem has starting python script @ bootup. think linux not able set time according timezone @ bootup . have printed system time @ boot in utc , not in utc-05:30 though timezone utc-05:30. since script starting @ bootup,it took system time set according utc , not utc-05:30. once system boots up, system time set correctly according timezone.i correct output date command. how python application not able time according timezone.

please help! in advance.


Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -