Jump to content

Recommended Posts

Hi guys, i want to convert WebKit/Chrome timestamps that i've found in chrome cookie database to Human-Readable time (if possible, with UTC or GMT offset).

  • Example of WebKit/Chrome timestamp13228999534132232
  • Output that i want: 2020-03-18 20:16:56

This site has a tool to do this work, but i wonder how to convert this time (this timestamp's time bases are 1600/01/01) to human-readable time:


Edited by Colduction
Link to post
Share on other sites
  • Developers
35 minutes ago, Colduction said:

Output that i want: 2020-03-18 20:16:56

Think the output should be  "March 18, 2020 10:05:34 AM" GMT according that website and this script should get that:

$timestamp = 13228999534132232
$sNewDate = _DateAdd('s', Int($timestamp/1000000+.5), "1601/01/01 00:00:00")
ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $sNewDate = ' & $sNewDate & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console


SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
Live for the present,
Dream of the future,
Learn from the past.

Link to post
Share on other sites
#include <Date.au3>
Global $EPOCHtime = 13228999534132232 / 1000000 ; <== microseconds to seconds

Global $aTimeZoneInfo = _Date_Time_GetTimeZoneInformation() ; ***
$EPOCHtime -= $aTimeZoneInfo[1] * 60 ; ***

Global $sDateTime = _DateAdd('s', Int($EPOCHtime), "1601/01/01 00:00:00")
ConsoleWrite('$sDateTime = ' & StringRegExpReplace($sDateTime, "(\d{4})/(\d{2})/(\d{2})", "${1}-${2}-${3}") & @CRLF)

EDIT : Hmm, probably the TimeZone information is even counterproductive here. Comment this part out if necessary, which would then correspond exactly to @Jos suggestion :lol:.

Edited by Musashi


"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move."

Link to post
Share on other sites
7 minutes ago, Nine said:

Glad to see. He changed his avatar, but he is BACK ! 

I've been banned from AutoIt forum, because of delay to answer a question (but i was not online to give answer).

Have you a problem with my account history?

Edited by Colduction
Link to post
Share on other sites
5 minutes ago, Danp2 said:

@Colduction https://www.autoitscript.com/forum/search/?q=epoch

P.S. In case you couldn't find it, the search box looks like this -- image.png.32d98c361b7cc040d15e05978b633cdd.png

I know that there is a search button in this site, but someone in other forums wrote about Chrome and he divided by 1600xxxx and 1000xxxx, i was think that these topics in AutoIt Forum was not useful 😕 Just this.

Link to post
Share on other sites
  • Jos locked this topic
This topic is now closed to further replies.
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By SkysLastChance
      I am having trouble finding a good way to click these "button" below. 

      I only need to be able to click them when they have both yes/no. Otherwise I don't have to worry about them. For instance if they looked like this I would NOT have worry about clicking them and can just ignore them all togheter.(Below Picture)

      The problem is as mentioned in the title, all of the ID's  are dynamic. (Classes too)

      Here is what it looks like if yes is already selected.

      This is what I was using to select the the button. However, I need to know if the button has already been clicked/selected or not.
      _WD_LoadWait($sSession) $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//span[text() = 'Offered access to electronic health information?']") Sleep(1000) _WD_ElementAction($sSession, $sElement, 'click') Sleep(500) _WD_Action($sSession, "actions", $sActionTab) Sleep(500) _WD_Action($sSession, "actions", $sActionEnter) Is there a way I can get the count of spans in the span class-"s_636" by tabbing over to the button? I am hoping someone might have some ideas on what I can try.
      Unfortunally, The site is for work so giving the site wont do any good. 
    • By goku200
      I am trying to change the settings of the print option to Save as PDF and its not changing the settings and clicking on the Save button at the bottom. Here is my script that I have written and the format is correct below. Chrome browser I'm using is 97.0 My script was working fine using Chrome 95.0\ Not sure why its not working now
      It finds the print-preview-app element but not the others.
    • By goku200
      I am trying to hit the Return key without having to use the Send keys. I have the following code and its not hitting the Return key. Am I missing something?
      ; Press Return $sAction = '{"actions":[{"type": "key", "id": "keyboard_1", "actions": [{"type": "keyDown", "value": "\uE006"},' ; Pause $sAction &= '{"type": "pause", "duration": 500},' ; Release Return $sAction &= '{"type": "keyUp", "value": "\uE006"}]}]}' _WD_Action($sSession, "actions", $sAction)  
    • By goku200
      I'm having some issues with my script that's not grabbing the id from the cell and appending it to the url test that I have in my script.
      Here is my script:
      What I'm having issues is looping through the id column in the excel spreadsheet and adding 1 to the url address when its tabbed by using _WD_NewTab. When it goes to the browser I'm wanting it to display: press Enter and save the file as 1.html and so forth for the others. Not sure what I'm doing wrong here. 
    • By SkysLastChance
      How should I be attempting to click this link?

      <span id="x2m8_R-s" class="s_22 s-text">Walk&nbsp;In</span> If I double click the Walk$nbsp;In the text reads Walk In.

      How can I search for this text? 
      I have tried a several  different ways with no luck. Here are a few;
      $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, '//span[text()="Walk${nbsp}In"]') $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//span[translate(text(), '\u00a0', ' ') = 'Walk In']") $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//span[contains(text(),'Walk In')]") $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//span[contains(text(),'Walk&nbsp;In')]") Any help is appreciated as always. 
  • Create New...