maoruibin / maoruibin/maoruibin.github.com

java 获取今天的起始时间戳(零点)

Open
#31 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

utils
Dominant language
HTML
Stars
22
Forks
4
PR merge metrics
No merged PRs in 30d

Description

public Timestamp getDayBegin() {
    Calendar cal = Calendar.getInstance();
    cal.set(Calendar.HOUR_OF_DAY, 0);
    cal.set(Calendar.SECOND, 0);
    cal.set(Calendar.MINUTE, 0);
    cal.set(Calendar.MILLISECOND, 001);
    return new Timestamp(cal.getTimeInMillis());
}

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the Java snippet included in the issue, starting with the Calendar field assignments used to define the day’s beginning. Verify the intended midnight timestamp and confirm the resulting value; no repository file or test is named, so completion criteria must be clarified before work begins.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.