mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-28 01:45:55 +08:00
Filename: Use iso8601 string
This sucks balls. Overall, the datetime handling in Dart is really really bad. It just has the concept of local time or utc time. There are a few packages which attempt to solve this, but none which really solve it in the way I would like. All I want is someway to generate an iso8601 string with the timezone. And that my DateTime should be aware of the timezone as an offset east of UTC. Is that really so hard?
This commit is contained in:
@ -49,6 +49,7 @@ class StateContainerState extends State<StateContainer> {
|
|||||||
getDirectory: getNotesDir,
|
getDirectory: getNotesDir,
|
||||||
dirName: "journal",
|
dirName: "journal",
|
||||||
gitCloneUrl: "root@bcn.vhanda.in:git/test",
|
gitCloneUrl: "root@bcn.vhanda.in:git/test",
|
||||||
|
fileNameGenerator: (Note n) => n.created.toIso8601String(),
|
||||||
);
|
);
|
||||||
|
|
||||||
StateContainerState(bool onBoardingCompleted) {
|
StateContainerState(bool onBoardingCompleted) {
|
||||||
|
@ -24,9 +24,10 @@ class GitNoteRepository implements NoteRepository {
|
|||||||
@required this.gitCloneUrl,
|
@required this.gitCloneUrl,
|
||||||
@required this.dirName,
|
@required this.dirName,
|
||||||
@required this.getDirectory,
|
@required this.getDirectory,
|
||||||
|
@required fileNameGenerator,
|
||||||
}) : _fileStorage = FileStorage(
|
}) : _fileStorage = FileStorage(
|
||||||
noteSerializer: new MarkdownYAMLSerializer(),
|
noteSerializer: new MarkdownYAMLSerializer(),
|
||||||
fileNameGenerator: (Note note) => note.id,
|
fileNameGenerator: fileNameGenerator,
|
||||||
getDirectory: getDirectory,
|
getDirectory: getDirectory,
|
||||||
) {
|
) {
|
||||||
// FIXME: This isn't correct. The gitUrl might not be cloned at this point!
|
// FIXME: This isn't correct. The gitUrl might not be cloned at this point!
|
||||||
|
Reference in New Issue
Block a user