Skip to content

Commit a2d6cf1

Browse files
committed
update doc and variable name for datetime ctor
1 parent 866d9ff commit a2d6cf1

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

src/aws-cpp-sdk-core/include/aws/core/utils/DateTime.h

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,11 @@ namespace Aws
7070
DateTime(int64_t millisSinceEpoch);
7171

7272
/**
73-
* Initializes time point to epoch time in seconds.millis
73+
* Initializes time point to epoch time in seconds with a millis mantissa,
74+
*
75+
* i.e. 1.1 would be 1100 milliseconds
7476
*/
75-
DateTime(double epoch_millis);
77+
DateTime(double secondsSinceEpoch);
7678

7779
/**
7880
* Initializes time point to value represented by timestamp and format.
@@ -95,7 +97,9 @@ namespace Aws
9597
DateTime operator-(const std::chrono::milliseconds& a) const;
9698

9799
/**
98-
* Assign from seconds.millis since epoch.
100+
* Initializes time point to epoch time in seconds with a millis mantissa,
101+
*
102+
* i.e. 1.1 would be 1100 milliseconds
99103
*/
100104
DateTime& operator=(double secondsSinceEpoch);
101105

@@ -145,7 +149,9 @@ namespace Aws
145149
Aws::String ToGmtStringWithMs() const;
146150

147151
/**
148-
* Get the representation of this datetime as seconds.milliseconds since epoch
152+
* Get the representation of this datetime as seconds with a millis mantissa since epoch
153+
*
154+
* i.e. 1.1 would be 1100 milliseconds
149155
*/
150156
double SecondsWithMSPrecision() const;
151157

src/aws-cpp-sdk-core/source/utils/DateTimeCommon.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1121,9 +1121,9 @@ DateTime::DateTime(int64_t millisSinceEpoch) : m_valid(true)
11211121
m_time = std::chrono::system_clock::time_point(timestamp);
11221122
}
11231123

1124-
DateTime::DateTime(double epoch_millis) : m_valid(true)
1124+
DateTime::DateTime(double secondsSinceEpoch) : m_valid(true)
11251125
{
1126-
std::chrono::duration<double, std::chrono::seconds::period> timestamp(epoch_millis);
1126+
std::chrono::duration<double, std::chrono::seconds::period> timestamp(secondsSinceEpoch);
11271127
m_time = std::chrono::system_clock::time_point(std::chrono::duration_cast<std::chrono::milliseconds>(timestamp));
11281128
}
11291129

0 commit comments

Comments
 (0)