Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

11
LINES

< > BotCompany Repo | #1026564 - localHours

JavaX fragment (include)

1  
import java.text.*;
2  
3  
static int localHours(long time) {
4  
  SimpleDateFormat sdf = new SimpleDateFormat("HH");
5  
  sdf.setTimeZone(localTimeZone());
6  
  ret parseInt(sdf.format(time));
7  
}
8  
9  
static int localHours() {
10  
  ret localHours(now());
11  
}

Author comment

Began life as a copy of #1026563

download  show line numbers  debug dex   

Travelled to 3 computer(s): mqqgnosmbjvj, tvejysmllsmz, xrpafgyirdlv

No comments. add comment

Snippet ID: #1026564
Snippet name: localHours
Eternal ID of this version: #1026564/1
Text MD5: bc068e1b0239e0060e60a4cbf6b9c7c4
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-01-13 23:34:40
Source code size: 244 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 5 / 11
Referenced in: [show references]

Formerly at http://tinybrain.de/1026564 & http://1026564.tinybrain.de