Skip to content
Snippets Groups Projects

Update listings to use date strings instead of timestamps #32

Merged Martin Lowe requested to merge github/fork/autumnfound/malowe/master/32 into master

Added support for RFC 3339 date string conversion. Updated dummy script to use moment.js to create RFC date strings.

Change-Id: I98324ddf19b20e6746eab7a576c57c67c96e8ae1 Signed-off-by: Martin Lowe martin.lowe@eclipse-foundation.org

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
7 package org.eclipsefoundation.marketplace.helper;
8
9 import java.text.ParseException;
10 import java.text.SimpleDateFormat;
11 import java.util.Date;
12
13 import org.slf4j.Logger;
14 import org.slf4j.LoggerFactory;
15
16 /**
17 * Central implementation for handling date time conversion in the service.
18 * Class needs to be instantiated as DateFormat objects are not safe by nature.
19 *
20 * @author Martin Lowe
21 */
22 public class DateTimeHelper {
  • Martin Lowe
    Martin Lowe @malowe started a thread on commit 97a62f82
  • 7 package org.eclipsefoundation.marketplace.helper;
    8
    9 import java.text.ParseException;
    10 import java.text.SimpleDateFormat;
    11 import java.util.Date;
    12
    13 import org.slf4j.Logger;
    14 import org.slf4j.LoggerFactory;
    15
    16 /**
    17 * Central implementation for handling date time conversion in the service.
    18 * Class needs to be instantiated as DateFormat objects are not safe by nature.
    19 *
    20 * @author Martin Lowe
    21 */
    22 public class DateTimeHelper {
    • Author Maintainer

      You're right! While I was doing this, I ended up switching to use Java 8 time as its more explicit at handling timezones and offsets compared to previous Date implementation. The tests should cover most cases for the helper now.

  • Created by mbarbero

    Review: Approved

  • Please register or sign in to reply
    Loading