import java.util.Calendar;

 public class Solution
 {
     public static void main(String[] args)
     {
         long totalMillis = System.currentTimeMillis();
         long totalSeconds = totalMillis / 1000;
         long second = totalSeconds % 60;
         long totalMinutes = totalSeconds / 60;
         long minute = totalSeconds % 60;
         long totalHours = totalMinutes / 60;
         long hour = totalHours % 24;

         Calendar calendar = Calendar.getInstance();
         int year = calendar.get(Calendar.YEAR);
         int month = calendar.get(Calendar.MONTH);
         int date = calendar.get(Calendar.DATE);

         System.out.println(year + "-" + month + "-" + date + " " + hour + ":" + minute + ":" + second);
     }
 }

HW5.33的更多相关文章

  1. CSharpGL(33)使用uniform块来优化对uniform变量的读写

    CSharpGL(33)使用uniform块来优化对uniform变量的读写 +BIT祝威+悄悄在此留下版了个权的信息说: Uniform块 如果shader程序变得比较复杂,那么其中用到的unifo ...

  2. C#开发微信门户及应用(33)--微信现金红包的封装及使用

    我在上篇随笔<C#开发微信门户及应用(32)--微信支付接入和API封装使用>介绍为微信支付的API封装及使用,其中介绍了如何配置好支付环境,并对扫码支付的两种方式如何在C#开发中使用进行 ...

  3. 最新版 chrome 33中,backgroundPosition 改了.

    ctrl.css('backgroundPosition' 返回值不一样, 原来是:-75px 0px 现在是:left 75px top 0px // chrome 33 返回的是 left 0px ...

  4. CentOS7 编译安装 Nodejs (实测 笔记 Centos 7.0 + node 0.10.33)

    环境: 系统硬件:vmware vsphere (CPU:2*4核,内存2G,双网卡) 系统版本:CentOS-7.0-1406-x86_64-DVD.iso 安装步骤: 1.准备 1.1 显示系统版 ...

  5. 背水一战 Windows 10 (33) - 控件(选择类): ListBox, RadioButton, CheckBox, ToggleSwitch

    [源码下载] 背水一战 Windows 10 (33) - 控件(选择类): ListBox, RadioButton, CheckBox, ToggleSwitch 作者:webabcd 介绍背水一 ...

  6. Apache Kafka – KIP 32,33 Time Index

    32, 33都是和时间相关的, KIP-32 - Add timestamps to Kafka message 引入版本,0.10.0.0 需要给kafka的message加上时间戳,这样更方便一些 ...

  7. CentOS 7.2.1511编译安装Nginx1.10.1+MySQL5.6.33+PHP5.6.26

    准备篇 一.防火墙配置 CentOS 7.x默认使用的是firewall作为防火墙,这里改为iptables防火墙. 1.关闭firewall: systemctl stop firewalld.se ...

  8. 33条C#和.NET经典面试题目及答案

    1. .NET中类和结构的区别? 答:结构和类具有大体的语法,但是结构受到的限制比类要多. a. 结构不能有默认的构造函数,因为结构的副本是用编译器创建和销毁的,所以不需要默认的构造函数和析构函数. ...

  9. Linux PHP5.3升级PHP5.5.33 (CentOS)

    由于要使用了laravel5.1,php要升级到5.5以上.具体环境是Aliyun Cent OS 7.0.由于阿里的yum源lastest只有5.4,laravel5.1必须php5.5,加了几个网 ...

随机推荐

  1. hdu 4726

    贪心 不是很难  各种细节注意 #include <cstdio> #include <cstring> #include <algorithm> using na ...

  2. NGUI自适应分辨率,黑边自动填充, 无黑边,等比例缩放

    原地址:http://game.ceeger.com/forum/read.php?tid=16571 1,给背景添加一个UIstretch, .将style选择最后一个FitInternalKeep ...

  3. [Ecmall]ECMALL目录结构设置与数据库表

    最近在做ecmall的开发,ecmall在开源方面还有待进步啊,官方没有提供开发文档,也没有关于系统架构组织的贡献,使用者都要自己从0开始,官方论坛连二次开发板块都没有,都在哪瞎扯淡,广告一堆.可悲~ ...

  4. Android进程守护

    http://blog.csdn.net/t12x3456/article/details/8982198 http://blog.csdn.net/ljx19900116/article/detai ...

  5. 64位ubuntu安装WPS

    http://jingyan.baidu.com/article/d3b74d64afd96f1f77e609a3.html http://sixipiaoyang.blog.163.com/blog ...

  6. 提供几个可注册的edu邮箱链接

    旧版的邮箱大全有edu邮箱的专题页面,放出来2个国内edu.cn邮箱的注册地址:@live.shop.edu.cn和@abc.shop.edu.cn,现在已经停止开放注册了. 其实旧版中还做了个隐藏的 ...

  7. SGU 101 修改

    感谢这里. test4确实是个不连通的case,奇怪的是我用check函数跟if (check() == false)来判断这个case,当不连通时就死循环,得到的结果是不一样的,前者得到WA,后者得 ...

  8. Foreman--Puppet类导入

    一.Foreman环境: foreman建好后,系统默认创建了3个环境:production,development,common, 1. production: 在puppet.conf里已经定义其 ...

  9. Unable to open c

    1. Unable to open c:\Cadence\PSD_14.2\tools\capture\allegro.cfg for reading. Please correct the abov ...

  10. UVa 1642 (综合) Magical GCD

    题意: 给出一个数列,求一个连续的子序列,使得MGCD(i, j) =  该子序列的长度(j-i+1) × 子序列的gcd 最大,并输出这个最大值. 分析: 感觉可能要用优先队列,但貌似也用不上. 但 ...