Convert local epoch 1970 in seconds time to UTC time The Next CEO of Stack OverflowHow to convert local time string to UTC?Convert UTC/GMT time to local timeWhat is the best way to convert seconds into (Hour:Minutes:Seconds:Milliseconds) time?Get current time in seconds since the Epoch on Linux, BashConvert UTC date time to local date timeHow to convert a unix timestamp (seconds since epoch) to Ruby DateTime?Converting datetime.date to UTC timestamp in PythonConverting Epoch time into the datetimeDoes Python's time.time() return the local or UTC timestamp?Converting time from one environment into another in C++

Could a dragon use its wings to swim?

Is it correct to say moon starry nights?

Is it convenient to ask the journal's editor for two additional days to complete a review?

Why did early computer designers eschew integers?

Aggressive Under-Indexing and no data for missing index

Is it okay to majorly distort historical facts while writing a fiction story?

Calculate the Mean mean of two numbers

Traveling with my 5 year old daughter (as the father) without the mother from Germany to Mexico

Man transported from Alternate World into ours by a Neutrino Detector

Won the lottery - how do I keep the money?

vector calculus integration identity problem

How to use ReplaceAll on an expression that contains a rule

Strange use of "whether ... than ..." in official text

The Ultimate Number Sequence Puzzle

Is a distribution that is normal, but highly skewed, considered Gaussian?

Is it professional to write unrelated content in an almost-empty email?

(How) Could a medieval fantasy world survive a magic-induced "nuclear winter"?

Spaces in which all closed sets are regular closed

What difference does it make using sed with/without whitespaces?

Is there a way to save my career from absolute disaster?

Is it OK to decorate a log book cover?

free fall ellipse or parabola?

Do I need to write [sic] when including a quotation with a number less than 10 that isn't written out?

My ex-girlfriend uses my Apple ID to login to her iPad, do I have to give her my Apple ID password to reset it?



Convert local epoch 1970 in seconds time to UTC time



The Next CEO of Stack OverflowHow to convert local time string to UTC?Convert UTC/GMT time to local timeWhat is the best way to convert seconds into (Hour:Minutes:Seconds:Milliseconds) time?Get current time in seconds since the Epoch on Linux, BashConvert UTC date time to local date timeHow to convert a unix timestamp (seconds since epoch) to Ruby DateTime?Converting datetime.date to UTC timestamp in PythonConverting Epoch time into the datetimeDoes Python's time.time() return the local or UTC timestamp?Converting time from one environment into another in C++










-1















I am trying to get the deletion time out of a Recycle.Bin $I file. The returned timestamp is in local time (Pacific Daylight Time (-700)). The timestamp is correct but I want it in UTC. I am having difficulty in figuring this out. Reference:
https://4n6xplorer.com/forensics/once-upon-a-time-in-recycle-bin/



import os
import time
import datetime

filename = "$IU0OUS4.txt"
with open(filename, 'rb') as f:
bindata = f.read()
f.close()

del_time = bindata[16:24]
print("binary output(bytes 16:23): " + str(del_time))

int_epoch_1601_ns = int.from_bytes(del_time, byteorder = 'little')
print("Epoch 1601 in nanoseconds: " + str(int_epoch_1601_ns))

int_epoch_1601_seconds = int((int_epoch_1601_ns * 100) / 1000000000)
print("Epoch 1601 in seconds: " + str(int_epoch_1601_seconds))

#fudge_factor - diff between epochs - 1/1/1601 and 1/1/1970
fudge_factor = -11644516800

int_epoch_1970_seconds = fudge_factor + int_epoch_1601_seconds
print("Epoch 1970 in seconds: " + str(int_epoch_1970_seconds))

delete_timestamp = time.ctime(int_epoch_1970_seconds) # generate timestamp
print("File deleted: " + delete_timestamp)


OUTPUT



binary output(bytes 16:23): b'xe0zx1c1xee`xd4x01'
Epoch 1601 in nanoseconds: 131836865243020000
Epoch 1601 in seconds: 13183686524
Epoch 1970 in seconds: 1539169724
File deleted: Wed Oct 10 04:08:44 2018









share|improve this question
























  • What's your reference for the file format?

    – Lightness Races in Orbit
    Mar 7 at 19:21











  • Windows 10 text file format

    – Damonv2
    Mar 7 at 20:06











  • More detail please

    – Lightness Races in Orbit
    Mar 8 at 0:48











  • I am confused of what you are asking for. This script manually pulls the time from bit 16 to bit 23 in little Endian in epoch 1601 time. I then converted it to be in epoch 1970 but the time is in local time. I would much rather have it in UTC time knowing that I am in pacific time as a variable. Is there a function to convert the 1970 epoch local time to UTC time? This file is a $I (deleted) text file from a Windows 10 Recycle.Bin.

    – Damonv2
    Mar 8 at 21:22











  • What was confusing about my question? I am asking how you determined the format of the file you're parsing. You can provide a citation/reference. Then, together, we can go through it and find a solution to your problem. I don't comprehend how the phrase "Windows 10 text file format" helps to further that goal.

    – Lightness Races in Orbit
    Mar 9 at 3:16
















-1















I am trying to get the deletion time out of a Recycle.Bin $I file. The returned timestamp is in local time (Pacific Daylight Time (-700)). The timestamp is correct but I want it in UTC. I am having difficulty in figuring this out. Reference:
https://4n6xplorer.com/forensics/once-upon-a-time-in-recycle-bin/



import os
import time
import datetime

filename = "$IU0OUS4.txt"
with open(filename, 'rb') as f:
bindata = f.read()
f.close()

del_time = bindata[16:24]
print("binary output(bytes 16:23): " + str(del_time))

int_epoch_1601_ns = int.from_bytes(del_time, byteorder = 'little')
print("Epoch 1601 in nanoseconds: " + str(int_epoch_1601_ns))

int_epoch_1601_seconds = int((int_epoch_1601_ns * 100) / 1000000000)
print("Epoch 1601 in seconds: " + str(int_epoch_1601_seconds))

#fudge_factor - diff between epochs - 1/1/1601 and 1/1/1970
fudge_factor = -11644516800

int_epoch_1970_seconds = fudge_factor + int_epoch_1601_seconds
print("Epoch 1970 in seconds: " + str(int_epoch_1970_seconds))

delete_timestamp = time.ctime(int_epoch_1970_seconds) # generate timestamp
print("File deleted: " + delete_timestamp)


OUTPUT



binary output(bytes 16:23): b'xe0zx1c1xee`xd4x01'
Epoch 1601 in nanoseconds: 131836865243020000
Epoch 1601 in seconds: 13183686524
Epoch 1970 in seconds: 1539169724
File deleted: Wed Oct 10 04:08:44 2018









share|improve this question
























  • What's your reference for the file format?

    – Lightness Races in Orbit
    Mar 7 at 19:21











  • Windows 10 text file format

    – Damonv2
    Mar 7 at 20:06











  • More detail please

    – Lightness Races in Orbit
    Mar 8 at 0:48











  • I am confused of what you are asking for. This script manually pulls the time from bit 16 to bit 23 in little Endian in epoch 1601 time. I then converted it to be in epoch 1970 but the time is in local time. I would much rather have it in UTC time knowing that I am in pacific time as a variable. Is there a function to convert the 1970 epoch local time to UTC time? This file is a $I (deleted) text file from a Windows 10 Recycle.Bin.

    – Damonv2
    Mar 8 at 21:22











  • What was confusing about my question? I am asking how you determined the format of the file you're parsing. You can provide a citation/reference. Then, together, we can go through it and find a solution to your problem. I don't comprehend how the phrase "Windows 10 text file format" helps to further that goal.

    – Lightness Races in Orbit
    Mar 9 at 3:16














-1












-1








-1








I am trying to get the deletion time out of a Recycle.Bin $I file. The returned timestamp is in local time (Pacific Daylight Time (-700)). The timestamp is correct but I want it in UTC. I am having difficulty in figuring this out. Reference:
https://4n6xplorer.com/forensics/once-upon-a-time-in-recycle-bin/



import os
import time
import datetime

filename = "$IU0OUS4.txt"
with open(filename, 'rb') as f:
bindata = f.read()
f.close()

del_time = bindata[16:24]
print("binary output(bytes 16:23): " + str(del_time))

int_epoch_1601_ns = int.from_bytes(del_time, byteorder = 'little')
print("Epoch 1601 in nanoseconds: " + str(int_epoch_1601_ns))

int_epoch_1601_seconds = int((int_epoch_1601_ns * 100) / 1000000000)
print("Epoch 1601 in seconds: " + str(int_epoch_1601_seconds))

#fudge_factor - diff between epochs - 1/1/1601 and 1/1/1970
fudge_factor = -11644516800

int_epoch_1970_seconds = fudge_factor + int_epoch_1601_seconds
print("Epoch 1970 in seconds: " + str(int_epoch_1970_seconds))

delete_timestamp = time.ctime(int_epoch_1970_seconds) # generate timestamp
print("File deleted: " + delete_timestamp)


OUTPUT



binary output(bytes 16:23): b'xe0zx1c1xee`xd4x01'
Epoch 1601 in nanoseconds: 131836865243020000
Epoch 1601 in seconds: 13183686524
Epoch 1970 in seconds: 1539169724
File deleted: Wed Oct 10 04:08:44 2018









share|improve this question
















I am trying to get the deletion time out of a Recycle.Bin $I file. The returned timestamp is in local time (Pacific Daylight Time (-700)). The timestamp is correct but I want it in UTC. I am having difficulty in figuring this out. Reference:
https://4n6xplorer.com/forensics/once-upon-a-time-in-recycle-bin/



import os
import time
import datetime

filename = "$IU0OUS4.txt"
with open(filename, 'rb') as f:
bindata = f.read()
f.close()

del_time = bindata[16:24]
print("binary output(bytes 16:23): " + str(del_time))

int_epoch_1601_ns = int.from_bytes(del_time, byteorder = 'little')
print("Epoch 1601 in nanoseconds: " + str(int_epoch_1601_ns))

int_epoch_1601_seconds = int((int_epoch_1601_ns * 100) / 1000000000)
print("Epoch 1601 in seconds: " + str(int_epoch_1601_seconds))

#fudge_factor - diff between epochs - 1/1/1601 and 1/1/1970
fudge_factor = -11644516800

int_epoch_1970_seconds = fudge_factor + int_epoch_1601_seconds
print("Epoch 1970 in seconds: " + str(int_epoch_1970_seconds))

delete_timestamp = time.ctime(int_epoch_1970_seconds) # generate timestamp
print("File deleted: " + delete_timestamp)


OUTPUT



binary output(bytes 16:23): b'xe0zx1c1xee`xd4x01'
Epoch 1601 in nanoseconds: 131836865243020000
Epoch 1601 in seconds: 13183686524
Epoch 1970 in seconds: 1539169724
File deleted: Wed Oct 10 04:08:44 2018






python datetime






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 13 at 20:24







Damonv2

















asked Mar 7 at 18:17









Damonv2Damonv2

12




12












  • What's your reference for the file format?

    – Lightness Races in Orbit
    Mar 7 at 19:21











  • Windows 10 text file format

    – Damonv2
    Mar 7 at 20:06











  • More detail please

    – Lightness Races in Orbit
    Mar 8 at 0:48











  • I am confused of what you are asking for. This script manually pulls the time from bit 16 to bit 23 in little Endian in epoch 1601 time. I then converted it to be in epoch 1970 but the time is in local time. I would much rather have it in UTC time knowing that I am in pacific time as a variable. Is there a function to convert the 1970 epoch local time to UTC time? This file is a $I (deleted) text file from a Windows 10 Recycle.Bin.

    – Damonv2
    Mar 8 at 21:22











  • What was confusing about my question? I am asking how you determined the format of the file you're parsing. You can provide a citation/reference. Then, together, we can go through it and find a solution to your problem. I don't comprehend how the phrase "Windows 10 text file format" helps to further that goal.

    – Lightness Races in Orbit
    Mar 9 at 3:16


















  • What's your reference for the file format?

    – Lightness Races in Orbit
    Mar 7 at 19:21











  • Windows 10 text file format

    – Damonv2
    Mar 7 at 20:06











  • More detail please

    – Lightness Races in Orbit
    Mar 8 at 0:48











  • I am confused of what you are asking for. This script manually pulls the time from bit 16 to bit 23 in little Endian in epoch 1601 time. I then converted it to be in epoch 1970 but the time is in local time. I would much rather have it in UTC time knowing that I am in pacific time as a variable. Is there a function to convert the 1970 epoch local time to UTC time? This file is a $I (deleted) text file from a Windows 10 Recycle.Bin.

    – Damonv2
    Mar 8 at 21:22











  • What was confusing about my question? I am asking how you determined the format of the file you're parsing. You can provide a citation/reference. Then, together, we can go through it and find a solution to your problem. I don't comprehend how the phrase "Windows 10 text file format" helps to further that goal.

    – Lightness Races in Orbit
    Mar 9 at 3:16

















What's your reference for the file format?

– Lightness Races in Orbit
Mar 7 at 19:21





What's your reference for the file format?

– Lightness Races in Orbit
Mar 7 at 19:21













Windows 10 text file format

– Damonv2
Mar 7 at 20:06





Windows 10 text file format

– Damonv2
Mar 7 at 20:06













More detail please

– Lightness Races in Orbit
Mar 8 at 0:48





More detail please

– Lightness Races in Orbit
Mar 8 at 0:48













I am confused of what you are asking for. This script manually pulls the time from bit 16 to bit 23 in little Endian in epoch 1601 time. I then converted it to be in epoch 1970 but the time is in local time. I would much rather have it in UTC time knowing that I am in pacific time as a variable. Is there a function to convert the 1970 epoch local time to UTC time? This file is a $I (deleted) text file from a Windows 10 Recycle.Bin.

– Damonv2
Mar 8 at 21:22





I am confused of what you are asking for. This script manually pulls the time from bit 16 to bit 23 in little Endian in epoch 1601 time. I then converted it to be in epoch 1970 but the time is in local time. I would much rather have it in UTC time knowing that I am in pacific time as a variable. Is there a function to convert the 1970 epoch local time to UTC time? This file is a $I (deleted) text file from a Windows 10 Recycle.Bin.

– Damonv2
Mar 8 at 21:22













What was confusing about my question? I am asking how you determined the format of the file you're parsing. You can provide a citation/reference. Then, together, we can go through it and find a solution to your problem. I don't comprehend how the phrase "Windows 10 text file format" helps to further that goal.

– Lightness Races in Orbit
Mar 9 at 3:16






What was confusing about my question? I am asking how you determined the format of the file you're parsing. You can provide a citation/reference. Then, together, we can go through it and find a solution to your problem. I don't comprehend how the phrase "Windows 10 text file format" helps to further that goal.

– Lightness Races in Orbit
Mar 9 at 3:16













0






active

oldest

votes












Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55050386%2fconvert-local-epoch-1970-in-seconds-time-to-utc-time%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55050386%2fconvert-local-epoch-1970-in-seconds-time-to-utc-time%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Save data to MySQL database using ExtJS and PHP [closed]2019 Community Moderator ElectionHow can I prevent SQL injection in PHP?Which MySQL data type to use for storing boolean valuesPHP: Delete an element from an arrayHow do I connect to a MySQL Database in Python?Should I use the datetime or timestamp data type in MySQL?How to get a list of MySQL user accountsHow Do You Parse and Process HTML/XML in PHP?Reference — What does this symbol mean in PHP?How does PHP 'foreach' actually work?Why shouldn't I use mysql_* functions in PHP?

Compiling GNU Global with universal-ctags support Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Data science time! April 2019 and salary with experience The Ask Question Wizard is Live!Tags for Emacs: Relationship between etags, ebrowse, cscope, GNU Global and exuberant ctagsVim and Ctags tips and trickscscope or ctags why choose one over the other?scons and ctagsctags cannot open option file “.ctags”Adding tag scopes in universal-ctagsShould I use Universal-ctags?Universal ctags on WindowsHow do I install GNU Global with universal ctags support using Homebrew?Universal ctags with emacsHow to highlight ctags generated by Universal Ctags in Vim?

Add ONERROR event to image from jsp tldHow to add an image to a JPanel?Saving image from PHP URLHTML img scalingCheck if an image is loaded (no errors) with jQueryHow to force an <img> to take up width, even if the image is not loadedHow do I populate hidden form field with a value set in Spring ControllerStyling Raw elements Generated from JSP tagds with Jquery MobileLimit resizing of images with explicitly set width and height attributeserror TLD use in a jsp fileJsp tld files cannot be resolved