How to parse timezone ID's in Dart? -


how parse timezone id such america/new_york utc-5 or europe/helsinki utc+2?

even better if dst taken account (so in previous 2 examples, both have dst right now).

i'm trying parse date time object:

america/new_york:20130208t080000 

the last part of string easy, can parsed either using custom date format or datetime.parse(), have no found way parse timezone id.

also, need on server side. i'm downloading , parsing ical feeds.

you can use unix date command :

import 'dart:io';  main() {   process.run('date', ['+%z'],  environment: {"tz":":europe/helsinki"})     .then((e){       print(e.stdout); // display +0300     }); } 

Comments