Updated the code to use the correct method of converting a time string to unix and ntp time.

Change-Id: I2586eab4efe24534345cdfe000dc02bc00a05c00
Merge "Updated the code to use the correct method of converting a time string to unix and ntp time."