Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2026-01-21 Dirk Eddelbuettel <edd@debian.org>

* inst/include/Rcpp/date_datetime/Datetime.h: Fractional seconds type
switched to 'int' for consistency, print format string re-adjusted

2026-01-20 Dirk Eddelbuettel <edd@debian.org>

* inst/include/Rcpp/date_datetime/Datetime.h (format): Correct a
Expand Down
4 changes: 2 additions & 2 deletions inst/include/Rcpp/date_datetime/Datetime.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ namespace Rcpp {
if (res == 0) {
return std::string("");
} else {
res = ::snprintf(txtsec, 63, "%s.%06u", txtiso, m_us);
res = ::snprintf(txtsec, 63, "%s.%06d", txtiso, m_us);
if (res <= 0) {
return std::string("");
} else {
Expand All @@ -93,7 +93,7 @@ namespace Rcpp {
private:
double m_dt; // fractional seconds since epoch
struct tm m_tm; // standard time representation
unsigned int m_us; // microsecond (to complement m_tm)
int m_us; // microsecond (to complement m_tm)

// update m_tm based on m_dt
void update_tm() {
Expand Down