mirror of
https://github.com/moonD4rk/HackBrowserData.git
synced 2026-10-13 03:37:12 +02:00
fix(time): correct export data timestamp conversions (#586)
This commit is contained in:
1 parent
0c6c781567
commit
50c4ea84cb
14 files changed
+228
-30
No files matched your search
@@ -20,6 +20,8 @@ func extractCookies(path string) ([]types.CookieEntry, error) {
|
||||
for _, page := range pages {
|
||||
for _, c := range page.Cookies {
|
||||
hasExpire := !c.Expires.IsZero()
|
||||
// binarycookies returns time.Time in Local; normalize to UTC
|
||||
// so exported JSON matches Chromium/Firefox cookie output.
|
||||
cookies = append(cookies, types.CookieEntry{
|
||||
Host: string(c.Domain),
|
||||
Path: string(c.Path),
|
||||
@@ -29,8 +31,8 @@ func extractCookies(path string) ([]types.CookieEntry, error) {
|
||||
IsHTTPOnly: c.HTTPOnly,
|
||||
HasExpire: hasExpire,
|
||||
IsPersistent: hasExpire,
|
||||
ExpireAt: c.Expires,
|
||||
CreatedAt: c.Creation,
|
||||
ExpireAt: c.Expires.UTC(),
|
||||
CreatedAt: c.Creation.UTC(),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user