Skip to content
GitLab
    • Explore Projects Groups Snippets
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Merge requests
  • !9717
An error occurred while fetching the assigned milestone of the selected merge_request.

[dart] fix Date.toDateTime utc

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/FallenRiteMonk/master into master 4 years ago
  • Overview 0
  • Commits 1
  • Pipelines 0
  • Changes 2

Created by: FallenRiteMonk

This is a minor fix for converting a Date to DateTime with the utc option set to true

Compare
  • master (base)

and
  • latest version
    d2a7f3ff
    1 commit, 2 years ago

2 files
+ 8
- 6

    Preferences

    File browser
    Compare changes
modules/…/…/…/…/…‎/…/…/…/built_value‎
date.m‎ustache‎ +4 -3
samples/openapi3/…‎/…/…/…/…/src/model‎
date‎.dart‎ +4 -3
modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/date.mustache
+ 4
- 3
  • View file @ d2a7f3ff

  • Edit in single-file editor

  • Open in Web IDE


@@ -24,9 +24,10 @@ class Date implements Comparable<Date> {
/// Convert to a [DateTime].
DateTime toDateTime({bool utc = false}) {
if (utc) {
DateTime.utc(year, month, day);
return DateTime.utc(year, month, day);
} else {
return DateTime(year, month, day);
}
return DateTime(year, month, day);
}
@override
@@ -66,4 +67,4 @@ class Date implements Comparable<Date> {
extension DateTimeToDate on DateTime {
Date toDate() => Date(year, month, day);
}
\ No newline at end of file
}
samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/model/date.dart
+ 4
- 3
  • View file @ d2a7f3ff

  • Edit in single-file editor

  • Open in Web IDE


@@ -24,9 +24,10 @@ class Date implements Comparable<Date> {
/// Convert to a [DateTime].
DateTime toDateTime({bool utc = false}) {
if (utc) {
DateTime.utc(year, month, day);
return DateTime.utc(year, month, day);
} else {
return DateTime(year, month, day);
}
return DateTime(year, month, day);
}
@override
@@ -66,4 +67,4 @@ class Date implements Comparable<Date> {
extension DateTimeToDate on DateTime {
Date toDate() => Date(year, month, day);
}
\ No newline at end of file
}
0 Assignees
None
Assign to
0 Reviewers
None
Request review from
Labels
0
None
0
None
    Assign labels
  • Manage project labels

Milestone
No milestone
None
None
Time tracking
No estimate or time spent
Lock merge request
Unlocked
0
0 participants
Reference:
Source branch: github/fork/FallenRiteMonk/master

Menu

Explore Projects Groups Snippets