Tuesday, January 28, 2020

local to UTC time or vice versa

You want to convert a local time to UTC time to be stored in a database running Vb.net



' Your local time        
Debug.Print("Time local:" + Now.ToString("yyyy-MM-dd HH:mm:ss")) 

Dim currentTime As DateTime = DateTime.UtcNow    'UTC Time

Debug.Print("Time UTC:" + currentTime.ToString("yyyy-MM-dd HH:mm:ss"))

' Convert UTC to local time

Debug.Print("UTC to Local time:" + currentTime.ToLocalTime.ToString("yyyy-MM-dd HH:mm:ss")) 

No comments:

MySQL to MariaDB

 Here is a good description how to migrate to MariaDb MySQL to MariaDb Example of how to dump data from MySQL port=3307: mysqldump --user=ro...