Browse Source

small fix

Yuriy Zhloba 10 years ago
parent
commit
7978bea4a5
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/herd_datetime.erl

+ 1 - 1
src/herd_datetime.erl

@@ -24,7 +24,7 @@ now_micro() ->
 
 
 -spec datetime_from_db(db_datetime()) -> calendar:datetime().
 -spec datetime_from_db(db_datetime()) -> calendar:datetime().
 datetime_from_db({Date, {Hour, Minute, Second}}) ->
 datetime_from_db({Date, {Hour, Minute, Second}}) ->
-    {Date, {Hour, Minute, round(Second)}}.
+    {Date, {Hour, Minute, trunc(Second)}}.
 
 
 
 
 -spec timestamp_to_datetime(timestamp() | timestamp_micro()) -> calendar:datetime().
 -spec timestamp_to_datetime(timestamp() | timestamp_micro()) -> calendar:datetime().