Skip to content

Date.toString() should have a variant that returns rfc3339 #3445

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
DartBot opened this issue Jun 8, 2012 · 2 comments
Closed

Date.toString() should have a variant that returns rfc3339 #3445

DartBot opened this issue Jun 8, 2012 · 2 comments
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. closed-obsolete Closed as the reported issue is no longer relevant core-2 P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug

Comments

@DartBot
Copy link

DartBot commented Jun 8, 2012

This issue was originally filed by sammcca...@google.com


Date.toString() currently returns something that is almost RFC3339 (it uses the variant with a space instead of 'T' as a separator).

However it's documented as a human-readable string and so I don't want to rely on that.

Could we have a method that explicitly returns a RFC3339 date (with 'T')?

@dgrove
Copy link
Contributor

dgrove commented Jun 11, 2012

cc @floitschG.
Removed Type-Defect label.
Added Type-Enhancement, Area-Library, Triaged labels.

@DartBot
Copy link
Author

DartBot commented Jun 11, 2012

This comment was originally written by @chrisbu


It would be useful to be able to simply convert a Date to a string format required by browser cookie "expires" parameter, similar to the old javascript toGMTString() function.

From Florian via the mailing list: http://goo.gl/HbJUx:
Note: toGMTString is deprecated and should be replaced with toUTCString.
https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Date/toGMTString

toUTCString is not completely specified, and might not return an rfc1123/rfc822 string:
https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Date/toUTCString

@DartBot DartBot added Type-Enhancement area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. labels Jun 11, 2012
@kevmoo kevmoo added P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug and removed triaged labels Feb 29, 2016
@lrhn lrhn added the core-m label Aug 11, 2017
@floitschG floitschG added core-2 and removed core-m labels Aug 31, 2017
@matanlurey matanlurey added the closed-obsolete Closed as the reported issue is no longer relevant label Jun 21, 2018
copybara-service bot pushed a commit that referenced this issue Jun 13, 2022
Changes:
```
> git log --format="%C(auto) %h %s" 51435ef..c4e9ddc
 https://dart.googlesource.com/pub.git/+/c4e9ddc8 Extend retries for file-ops on windows (#3451)
 https://dart.googlesource.com/pub.git/+/6aeb1795 Upgrade package:lints to 2.0.0 (#3445)
 https://dart.googlesource.com/pub.git/+/73ea9a98 Roll tar to 0.5.5+1 (#3447)
 https://dart.googlesource.com/pub.git/+/2dc887fe Add env var for writing golden files (#3222)
 https://dart.googlesource.com/pub.git/+/764500b8 List all files in pub publish (#3440)
 https://dart.googlesource.com/pub.git/+/0b52e6a8 Remove debug print (#3441)
 https://dart.googlesource.com/pub.git/+/ea070238 Merge pull request #3443 from jonasfj/master
 https://dart.googlesource.com/pub.git/+/bffd1267 Merge branch 'cherry-pick-for-2.17.2'
 https://dart.googlesource.com/pub.git/+/c66381c5 Make `name` field of `_UserInfo` nullable. Fix #3424 (#3442)
 https://dart.googlesource.com/pub.git/+/cecc8e3c Handle broken response from userinfo_endpoint (#3427)
 https://dart.googlesource.com/pub.git/+/6c635040 Make `name` field of `_UserInfo` nullable. Fix #3424 (#3442)
 https://dart.googlesource.com/pub.git/+/6f20a94b Handle missing pubspec.lock in dependency_services list (#3439)
 https://dart.googlesource.com/pub.git/+/0ad17e84 Handle broken response from userinfo_endpoint (#3427)
 https://dart.googlesource.com/pub.git/+/153ef061 `pub add` create top-level attribute in block-style if possible. (#3423)
 https://dart.googlesource.com/pub.git/+/3b96f910 Handle error code 183 on windows (#3426)
 https://dart.googlesource.com/pub.git/+/9eb6428c Ignore `pubspec_overrides.yaml` for `publish` command (#3419)

```

Diff: https://dart.googlesource.com/pub.git/+/51435efcd574b7bc18d47a5dd620cb9759dea8f8~..c4e9ddc888c3aa89ef4462f0c4298929191e32b9/
Change-Id: I6dacb3e95c6399d3fb5cf340b5d0e5cded270684
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247962
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Jonas Jensen <jonasfj@google.com>
copybara-service bot pushed a commit that referenced this issue Jun 20, 2023
… webdev

Revisions updated by `dart tools/rev_sdk_deps.dart`.

bazel_worker (https://github.com/dart-lang/bazel_worker/compare/c14a268..f7b714e):
  f7b714e  2023-06-16  Jacob MacDonald  add firehose publishing workflow (#76)
  0743f11  2023-06-16  Parker Lougheed  Require protobuf 3.0.0 and prepare for 1.0.3 release (#75)

dartdoc (https://github.com/dart-lang/dartdoc/compare/5799424..793d575):
  793d575d  2023-06-14  Sam Rawlins  Remove unused coverage feature (#3444)
  19ad21a4  2023-06-14  Parker Lougheed  Replace `@sealed` meta usage with keyword (#3445)
  8e9d89e3  2023-06-12  Sam Rawlins  Remove all `@deprecated` elements. (#3250)
  2019791c  2023-06-12  dependabot[bot]  Bump actions/checkout from 3.5.2 to 3.5.3 (#3442)
  d34c7067  2023-06-12  dependabot[bot]  Bump github/codeql-action from 2.3.6 to 2.13.4 (#3443)

http (https://github.com/dart-lang/http/compare/ba7eb60..8c25057):
  8c25057  2023-06-16  Nate Bosch  Unskip a skipped test (#966)

protobuf (https://github.com/dart-lang/protobuf/compare/a9bf79f..e76bd74):
  e76bd74  2023-06-19  Ömer Sinan Ağacan  Remove protoc_plugin exe from repo, update .gitignore (#851)
  4b71e60  2023-06-16  Ömer Sinan Ağacan  Fix a change in protoc_plugin changelog (#846)
  f4ffa1d  2023-06-16  Ömer Sinan Ağacan  Fix missing protobuf import in grpc files (#845)

source_maps (https://github.com/dart-lang/source_maps/compare/dd5b5cd..58eef30):
  58eef30  2023-06-12  Kevin Moore  Require Dart 3, update lints (#79)

tools (https://github.com/dart-lang/tools/compare/8d6e8b8..02b5cc5):
  02b5cc5  2023-06-16  Brian Wilkerson  Add documentation for server events (#115)
  698bfe8  2023-06-15  Elias Yishak  Introducing new `Event` class that can be send via `analytics.send(Event event)` (#114)

webdev (https://github.com/dart-lang/webdev/compare/81ae77a..b58edb7):
  b58edb7d  2023-06-16  Elliott Brooks  Fix the DCM workflow (#2147)
  1551fe6c  2023-06-16  Elliott Brooks  Wrap VM service API methods in an error handler to convert any exceptions into type `RPCError`
(#2144)
  06abe901  2023-06-14  Elliott Brooks  Add more tests to daily testing cron job (#2138)
  5cb2dcf6  2023-06-13  Elliott Brooks  Use new error codes from package:vm_service (#2141)

Change-Id: I6779c6d20fbc69e83848f469df3e0b4d21420a9a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310322
Auto-Submit: Devon Carew <devoncarew@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. closed-obsolete Closed as the reported issue is no longer relevant core-2 P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

6 participants