关于日期2013-05-25T19:09:18.769+0800格式化

本文介绍如何使用Java的SimpleDateFormat类来格式化包含时区的日期时间字符串,具体示例为2013-05-25T19:09:18.769+0800。

其中,T代表后面是时间;+0800代表的是时区,形如GMT-08:00也是一样。

如何将2013-05-25T19:09:18.769+0800格式化,通过JDK知道,SimpleDateFormat格式化时可以加上自定义的标签,前提是用单引号包围。

写出如下:

SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ");

即可格式化日期了。

[root@ceph1 ~]# ceph osd new $(uuidgen) -i 5 --keyring /var/lib/ceph/osd/ceph-5/keyring 2025-09-25T21:17:30.217+0800 7fc5f8b12640 -1 auth: unable to find a keyring on /var/lib/ceph/osd/ceph-5/keyring: (2) No such file or directory 2025-09-25T21:17:30.217+0800 7fc5f8b12640 -1 AuthRegistry(0x7fc5f4061140) no keyring found at /var/lib/ceph/osd/ceph-5/keyring, disabling cephx 2025-09-25T21:17:30.218+0800 7fc5f8b12640 -1 auth: unable to find a keyring on /var/lib/ceph/osd/ceph-5/keyring: (2) No such file or directory 2025-09-25T21:17:30.218+0800 7fc5f8b12640 -1 AuthRegistry(0x7fc5f40642b0) no keyring found at /var/lib/ceph/osd/ceph-5/keyring, disabling cephx 2025-09-25T21:17:30.219+0800 7fc5f8b12640 -1 auth: unable to find a keyring on /var/lib/ceph/osd/ceph-5/keyring: (2) No such file or directory 2025-09-25T21:17:30.219+0800 7fc5f8b12640 -1 AuthRegistry(0x7fc5f8b11000) no keyring found at /var/lib/ceph/osd/ceph-5/keyring, disabling cephx 2025-09-25T21:17:30.220+0800 7fc5f1d9b640 -1 monclient(hunting): handle_auth_bad_method server allowed_methods [2] but i only support [1] 2025-09-25T21:17:30.220+0800 7fc5f259c640 -1 monclient(hunting): handle_auth_bad_method server allowed_methods [2] but i only support [1] 2025-09-25T21:17:30.221+0800 7fc5f2d9d640 -1 monclient(hunting): handle_auth_bad_method server allowed_methods [2] but i only support [1] 2025-09-25T21:17:30.221+0800 7fc5f8b12640 -1 monclient: authenticate NOTE: no keyring found; disabled cephx authentication [errno 13] RADOS permission denied (error connecting to the cluster) 什么问题
09-26
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值