Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix datetime tick storage #459

Merged
merged 1 commit into from
Feb 1, 2019
Merged

Fix datetime tick storage #459

merged 1 commit into from
Feb 1, 2019

Conversation

softlion
Copy link
Contributor

@softlion softlion commented Feb 1, 2019

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

Fix bug where datetime is stored as local and restored as UTC forgetting the offset.

What is the current behavior? (You can also link to an open issue here)

stores 12:00 UTC+1
restores 12.00 UTC+0

What is the new behavior (if this is a feature change)?

stores 12:00 UTC+1
restores 11.00 UTC+0

Does this PR introduce a breaking change?

No

Please check if the PR fulfills these requirements

Other information:

@softlion
Copy link
Contributor Author

softlion commented Feb 18, 2019

My pr introduced a bug showing an infinite loop of calls exhausting the stack:
edit: it's not my pr, it's your code lol :)
edit2: it's not my pr, it's not your code. It's when an existingContractResolver is non null and derives from DefaultContractResolver. Then it loops ...

Newtonsoft_Json_Utilities_ThreadSafeStore_2_TKey_REF_TValue_REF_Get_TKey_REF + 29119496 (ThreadSafeStore.cs:64)
Newtonsoft_Json_Serialization_DefaultContractResolver_ResolveContract_System_Type + 29123632 (DefaultContractResolver.cs:198)
Akavache_JsonDateTimeContractResolver_CreateContract_System_Type + 38540100 (/D:\a\1\s\src\Akavache.Core\JsonDateTimeContractResolver.cs:23)
System_Collections_Concurrent_ConcurrentDictionary_2_TKey_REF_TValue_REF_GetOrAdd_TKey_REF_System_Func_2_TKey_REF_TValue_REF + 180
Newtonsoft_Json_Utilities_ThreadSafeStore_2_TKey_REF_TValue_REF_Get_TKey_REF + 29119496 (ThreadSafeStore.cs:64)
Newtonsoft_Json_Serialization_DefaultContractResolver_ResolveContract_System_Type + 29123632 (DefaultContractResolver.cs:198)
Akavache_JsonDateTimeContractResolver_CreateContract_System_Type + 38540100 (/D:\a\1\s\src\Akavache.Core\JsonDateTimeContractResolver.cs:23)
System_Collections_Concurrent_ConcurrentDictionary_2_TKey_REF_TValue_REF_GetOrAdd_TKey_REF_System_Func_2_TKey_REF_TValue_REF + 180
Newtonsoft_Json_Utilities_ThreadSafeStore_2_TKey_REF_TValue_REF_Get_TKey_REF + 29119496 (ThreadSafeStore.cs:64)
Newtonsoft_Json_Serialization_DefaultContractResolver_ResolveContract_System_Type + 29123632 (DefaultContractResolver.cs:198)
Akavache_JsonDateTimeContractResolver_CreateContract_System_Type + 38540100 (/D:\a\1\s\src\Akavache.Core\JsonDateTimeContractResolver.cs:23)
System_Collections_Concurrent_ConcurrentDictionary_2_TKey_REF_TValue_REF_GetOrAdd_TKey_REF_System_Func_2_TKey_REF_TValue_REF + 180
Newtonsoft_Json_Utilities_ThreadSafeStore_2_TKey_REF_TValue_REF_Get_TKey_REF + 29119496 (ThreadSafeStore.cs:64)
Newtonsoft_Json_Serialization_DefaultContractResolver_ResolveContract_System_Type + 29123632 (DefaultContractResolver.cs:198)
Akavache_JsonDateTimeContractResolver_CreateContract_System_Type + 38540100 (/D:\a\1\s\src\Akavache.Core\JsonDateTimeContractResolver.cs:23)
System_Collections_Concurrent_ConcurrentDictionary_2_TKey_REF_TValue_REF_GetOrAdd_TKey_REF_System_Func_2_TKey_REF_TValue_REF + 180
Newtonsoft_Json_Utilities_ThreadSafeStore_2_TKey_REF_TValue_REF_Get_TKey_REF + 29119496 (ThreadSafeStore.cs:64)```

@glennawatson
Copy link
Contributor

Lets take this one to an issue.

@lock lock bot locked and limited conversation to collaborators Jun 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants