How do i get the current time of a different time zone? Example, i need to know the current time in Singapore where as my system is set to PT time.
One implementation would be to use time to get the current time in UTC and then manipulate the TZ environment variable to your destination timezone. Then use localtime_r to convert to that timezone's local time.
time
TZ
localtime_r