diff --git a/CHANGELOG.md b/CHANGELOG.md index c7d6950f9..3ce6a3925 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # package:sentry changelog +## 0.0.6 + +- use UTC in the `timestamp` field + ## 0.0.5 - remove sub-seconds from the timestamp diff --git a/README.md b/README.md index db90a8e09..55830291e 100644 --- a/README.md +++ b/README.md @@ -50,3 +50,7 @@ main() async { [run_zoned]: https://api.dartlang.org/stable/1.24.1/dart-async/runZoned.html [flutter_error]: https://docs.flutter.io/flutter/foundation/FlutterError/onError.html + +## Found a bug? + +Please file it at https://github.com/flutter/flutter/issues/new diff --git a/lib/sentry.dart b/lib/sentry.dart index e65a4b927..73d97cae5 100644 --- a/lib/sentry.dart +++ b/lib/sentry.dart @@ -60,7 +60,7 @@ class SentryClient { UuidGenerator uuidGenerator, }) { httpClient ??= new Client(); - clock ??= const Clock(); + clock ??= const Clock(_getUtcDateTime); uuidGenerator ??= _generateUuidV4WithoutDashes; compressPayload ??= true; @@ -262,6 +262,10 @@ class SeverityLevel { final String name; } +/// Sentry does not take a timezone and instead expects the date-time to be +/// submitted in UTC timezone. +DateTime _getUtcDateTime() => new DateTime.now().toUtc(); + /// An event to be reported to Sentry.io. @immutable class Event { diff --git a/lib/src/version.dart b/lib/src/version.dart index 7722e1175..3b44835c5 100644 --- a/lib/src/version.dart +++ b/lib/src/version.dart @@ -9,7 +9,7 @@ library version; /// The SDK version reported to Sentry.io in the submitted events. -const String sdkVersion = '0.0.5'; +const String sdkVersion = '0.0.6'; /// The SDK name reported to Sentry.io in the submitted events. const String sdkName = 'dart'; diff --git a/pubspec.yaml b/pubspec.yaml index b9ddea4c2..89d511083 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,18 +1,18 @@ name: sentry -version: 0.0.5 +version: 0.0.6 description: A pure Dart Sentry.io client. author: Flutter Authors homepage: https://github.com/flutter/sentry dependencies: - http: ">=0.11.3+13 <2.0.0" - meta: ">=1.0.5 <2.0.0" + http: ">=0.11.0 <2.0.0" + meta: ">=1.0.0 <2.0.0" quiver: ">=0.25.0 <2.0.0" - stack_trace: ">=1.7.3 <2.0.0" - usage: ">=3.1.1 <4.0.0" + stack_trace: ">=1.0.0 <2.0.0" + usage: ">=3.0.0 <4.0.0" dev_dependencies: - args: ">=0.13.7 <2.0.0" - test: ">=0.12.21 <2.0.0" - yaml: ">=2.1.12 <3.0.0" - mockito: ">=2.0.2 <3.0.0" + args: ">=0.13.0 <2.0.0" + test: ">=0.12.0 <2.0.0" + yaml: ">=2.1.0 <3.0.0" + mockito: ">=2.0.0 <3.0.0" diff --git a/tool/presubmit.sh b/tool/presubmit.sh index 898a89e8a..a50a5f167 100755 --- a/tool/presubmit.sh +++ b/tool/presubmit.sh @@ -3,6 +3,7 @@ set -e set -x +pub get dartanalyzer --strong --fatal-warnings ./ pub run test --platform vm dartfmt -n --set-exit-if-changed ./