Powershell get current time for Asia/Manila -
i working powershell retrieves timesheet information biometric device. 1 of search arguments used query timesheet date , time. currently, retrieve date , time in local machine powershell installed. code inside powershell script getting date is:
get-date -format yyyy-mm-dd
however, if changes date , time of computer, query gets affected. there way retrieve current datestamp asia/manila using powershell? dont want use local machine time anymore.
you can convert date universal time before formatting string:
(get-date).touniversaltime().tostring('yyyy-mm-dd')
Comments
Post a Comment