---
title: "打印昨天的当前时刻的一个简易写法"
author: "showcup"
date: "2008-11-06T21:17:15Z"
tags: []
slug: "untitled"
draft: false
lastmod: "2008-11-06T21:17:15Z"
id: 263376
url: "https://showcup.iteye.com/blog/263376"
---

```java
public static void main(String[] args) {
	Date d=new Date(System.currentTimeMillis()-24*60*60*1000));
	System.out.println(d.toLocaleString());
}

```