Serenity: Core: A typo in DateTime

Created on 25 Feb 2020  路  3Comments  路  Source: SerenityOS/serenity

@awesomekling The following line has a typo.
https://github.com/SerenityOS/serenity/blob/ab9a0780e35a027893c26cd187f93530ca2ffe33/Libraries/LibCore/DateTime.cpp#L56
It should be

return String::format("%04u-%02u-%02u %02u:%02u:%02u", m_year, m_month, m_day, m_hour, m_minute, m_second);

Moreover, I think it is best to provide a format() function for this class to output a formatted date time string according to user-provided format. Such a function could be used by the date program.

All 3 comments

If needed, I'd like to work on this issue.

Go for it man, you can always just open a PR with the fix instead making an issue :) You've already done all the hard work anyway..

Indeed, you can just open a PR. Also, you don't need to tag me in every post, I am watching the project and get notified about everything anyway :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Arthur-Kamau picture Arthur-Kamau  路  7Comments

danboid picture danboid  路  5Comments

Quaker762 picture Quaker762  路  6Comments

ZyorYT picture ZyorYT  路  6Comments

nvella picture nvella  路  6Comments