Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

timestamp firebase

// Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.

long millis = System.currentTimeMillis();

Timestamp timestamp = 
  Timestamp.newBuilder()
           .setSeconds(millis / 1000)
           .setNanos((int)(millis % 1000 * 1_000_000))
           .build();
Source by github.com #
 
PREVIOUS NEXT
Tagged: #timestamp #firebase
ADD COMMENT
Topic
Name
7+5 =