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

Exception on Ubuntu #179

Open
cheasonxie opened this issue Aug 2, 2023 · 0 comments
Open

Exception on Ubuntu #179

cheasonxie opened this issue Aug 2, 2023 · 0 comments

Comments

@cheasonxie
Copy link

my code is following:

import 'package:timezone/standalone.dart' as tz;

main() async {
  await tz.initializeTimeZone();
  tz.Location detroit = tz.getLocation('America/Detroit');
  tz.TZDateTime now = tz.TZDateTime.now(detroit);
  print('Detroit time:$now');
}

this code run ok on win10, but exception occur on ubuntu while calling initializeTimeZone():

Invalid argument (uri): Value must be a String or a Uri: null
#0      initializeTimeZone.<anonymous closure> (package:timezone/standalone.dart:81)
#1      _RootZone.runUnary (dart:async/zone.dart:1661)
#2      _FutureListener.handleError (dart:async/future_impl.dart:165)
#3      Future._propagateToListeners.handleError (dart:async/future_impl.dart:796)
#4      Future._propagateToListeners (dart:async/future_impl.dart:817)
#5      Future._completeError (dart:async/future_impl.dart:592)
#6      _SuspendState._createAsyncStarCallback.<anonymous closure> (dart:async-patch/async_patch.dart:379)
<asynchronous suspension>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant