[Groonga-commit] groonga/grnci at adcff2a [master] Fix a bug that grnci.Now() returns a wrong value.

Back to archive index

Susumu Yata null+****@clear*****
Thu Jul 14 18:56:37 JST 2016


Susumu Yata	2016-07-14 18:56:37 +0900 (Thu, 14 Jul 2016)

  New Revision: adcff2af2485ff5723c14a39b942037c749c28d6
  https://github.com/groonga/grnci/commit/adcff2af2485ff5723c14a39b942037c749c28d6

  Message:
    Fix a bug that grnci.Now() returns a wrong value.

  Modified files:
    type.go

  Modified: type.go (+1 -2)
===================================================================
--- type.go    2016-07-01 16:29:54 +0900 (506305b)
+++ type.go    2016-07-14 18:56:37 +0900 (58b2596)
@@ -206,8 +206,7 @@ func (val *Geo) UnmarshalJSON(data []byte) error {
 
 // Now returns the current time.
 func Now() Time {
-	now := time.Now()
-	return Time((now.Unix() * 1000000) + (now.UnixNano() / 1000))
+	return Time(time.Now().UnixNano() / 1000)
 }
 
 // Unix returns sec and nsec for time.Unix.
-------------- next part --------------
HTML����������������������������...
下载 



More information about the Groonga-commit mailing list
Back to archive index