aws-amplify / aws-amplify/amplify-android
datastore adds UTC mark to AWSTime values even when they don't have it - dev preview
- Dominant language
- Java
- Stars
- 287
- Forks
- 132
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 45
Description
### Before opening, please confirm:
- [X] I have [searched for duplicate or closed issues](https://github.com/aws-amplify/amplify-android/issues?q=is%3Aissue+) and [discussions](https://github.com/aws-amplify/amplify-android/discussions).
### Language and Async Model
Kotlin
### Amplify Categories
DataStore
### Gradle script dependencies
```groovy
// Put output below this line
dependencies {
api amplifyFlutter
implementation "com.amplifyframework:aws-datastore:1.36.5-dev-preview.0"
implementation "com.amplifyframework:aws-api-appsync:1.36.5-dev-preview.0"
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.mockito:mockito-core:4.0.0'
testImplementation 'org.mockito:mockito-inline:3.11.2'
testImplementation 'androidx.test:core:1.4.0'
// Tests must be updated if bumped
//noinspection GradleDependency
testImplementation 'org.robolectric:robolectric:4.3.1'
testImplementation 'com.fasterxml.jackson.core:jackson-core:2.12.4'
testImplementation 'com.fasterxml.jackson.core:jackson-annotations:2.12.4'
testImplementation 'com.fasterxml.jackson.core:jackson-databind:2.12.4'
}
```
### Environment information
```
# Put output below this line
------------------------------------------------------------
Gradle 7.2
------------------------------------------------------------
Build time: 2021-08-17 09:59:03 UTC
Revision: a773786b58bb28710e3dc96c4d1a7063628952ad
Kotlin: 1.5.21
Groovy: 3.0.8
Ant: Apache Ant(TM) version 1.10.9 compiled on September 27 2020
JVM: 11.0.14.1 (Homebrew 11.0.14.1+0)
OS: Mac OS X 12.6 x86_64
```
### Please include any relevant guides or documentation you're referencing
_No response_
### Describe the bug
Found as a bug in flutter dev-preview https://github.com/aws-amplify/amplify-flutter/issues/2214 which uses amplify-android dev preview.
If I have a model with type of AWSTime and I save a time that does not include timezone (which is optional), the version of the model that I query from the datastore will always include "Z" to indicate UTC.
Expected: AWSTime values respect inclusion/omitting timezone as saved
### Reproduction steps (if applicable)
Save a model with a value of type `AWSTime` with no timezone offset set. Then, query that from the datastore and the model will have a timezone offset added "Z" which is optional, but should reflect how user saved it. I'm not sure if saved that way or happens during query.
### Code Snippet
```java
// Put your code below this line.
```
### Log output
```
// Put your logs below this line
```
### amplifyconfiguration.json
_No response_
### GraphQL Schema
```graphql
// Put your schema below this line
```
### Additional information and screenshots
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.