I would like to log in JST time on a PC in any environment.
(Even with English OS, even if the time zone is set to another country)
By the way, I found that when using the NOW function, it depends on the time zone, so
For example, if the area was changed to the United States, it was NG because the American time was acquired.
For now, I'm thinking that I should adjust +9 hours after getting the UTC time,
I haven't learned as much as I want.
[Reference source 1]
[Excerpt from the URL]
Set dateTime = CreateObject ("WbemScripting.SWbemDateTime") dateTime.SetVarDate (now ()) wscript.echo "Local Time:"&dateTime wscript.echo "UTC Time:"&dateTime.GetVarDate (false)
I gave up because it seems that I can't process numbers (+9 hours) later with this method. .. ..
[Reference source 2]
[Code excerpt from URL]
Option Explicit 'Define and generate various objects used in WMI. Dim oClassSet Dim oClass Dim oLocator Dim oService Dim sMesStr 'Connect to your local computer. Set oLocator = WScript.CreateObject ("WbemScripting.SWbemLocator") Set oService = oLocator.ConnectServer 'Specify the query condition in WQL. Set oClassSet = oService.ExecQuery ("Select * From Win32_UTCTime") 'Analyze the collection. For Each oClass In oClassSet sMesStr = sMesStr&oClass.Hour&":"&oClass.Minute&":"&oClass.Second&vbCrLf Next MsgBox ("Information about UTC (Coordinated Universal Time)."&VbCrLf&vbCrLf&sMesStr) 'Clean up the various objects used. Set oClassSet = Nothing Set oClass = Nothing Set oService = Nothing Set oLocator = Nothing
In this case, it could not be obtained in hh: mm: ss format.
7:08:05 becomes 7: 8: 5. .. ..
Answer # 1
In Reference 2, the character string 0 is added to the numbers below 10 to form HH: MM: SS.
- go - i want to get the next text that contains the specified text
- ruby - i want to get the current time and save it in a time column
- [php] i want to get the result obtained by sql
- java - i want to get the values from two arrays
- i want to get the string that i got with nodejs
- twitter - i want to get the top 5 tweets from "topic tweets"
- i want to get the position of a javafx cell
- laravel - i want to get the record associated with the user id
- c # - i want to get the bool in scriptableobject
- i want to get the message sent to bot with php-telegram-bot
- php - i want to get the key of a multidimensional array
- python - i want to get the server id with discordpy
- xcode - i want to get the value of dictionary type
- i want to get the date from a string in python
- vba - i want to get the last column with the data in the specified row
- [vbnet] i want to get the extension from the file name
- i want to get the project id with firebase
- i want to get the name of name with vba
- python - you may need to restart the kernel to use updated packages error
- php - coincheck api authentication doesn't work
- php - i would like to introduce the coincheck api so that i can make payments with bitcoin on my ec site
- [php] i want to get account information using coincheck api
- the emulator process for avd pixel_2_api_29 was killed occurred when the android studio emulator was started, so i would like to
- python 3x - typeerror: 'method' object is not subscriptable
- i want to call a child component method from a parent in vuejs
- dart - flutter: the instance member'stars' can't be accessed in an initializer error
- xcode - pod install [!] no `podfile 'found in the project directory