gmt 0.8.0 copy "gmt: ^0.8.0" to clipboard
gmt: ^0.8.0 copied to clipboard

Get current datetime in GMT from internet (example.com, google.com or your own urls) and return DateTime in UTC.

example/main.dart

import 'dart:async';

import 'package:gmt/gmt.dart';

void main() async {
  Timer.periodic(const Duration(seconds: 1), (timer) async {
    print(await GMT.now(urls: [
      'https://www.example.com',
      'https://www.google.com',
    ], timeoutOfEach: Duration(seconds: 1)));
  });

  await Future.delayed(const Duration(seconds: 10));
}
1
likes
160
points
225
downloads

Publisher

verified publisherlamnhan.dev

Weekly Downloads

Get current datetime in GMT from internet (example.com, google.com or your own urls) and return DateTime in UTC.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

http, universal_io

More

Packages that depend on gmt