~steve-evolvedlight/opensatnav/osm-droid-update

« back to all changes in this revision

Viewing changes to src/org/anddev/openstreetmap/contributor/util/Util.java

  • Committer: evolvedlight
  • Date: 2009-10-10 22:58:29 UTC
  • Revision ID: svn-v4:9bbf34d3-3897-488d-afc9-b14ce4e6a41e:trunk:65
Changeset for issue #30
This is the first commit of the Contribute to OSM functionality.

It's still a bit rough around the edges but it means other people can also contribute more easily.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Created by plusminus on 13:24:05 - 21.09.2008
 
2
package org.anddev.openstreetmap.contributor.util;
 
3
 
 
4
import java.text.SimpleDateFormat;
 
5
import java.util.Date;
 
6
import java.util.TimeZone;
 
7
 
 
8
 
 
9
public class Util {
 
10
        // ===========================================================
 
11
        // Constants
 
12
        // ===========================================================
 
13
        
 
14
        public static final SimpleDateFormat UTCSimpleDateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
 
15
        {
 
16
                UTCSimpleDateFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
 
17
        }
 
18
 
 
19
        // ===========================================================
 
20
        // Fields
 
21
        // ===========================================================
 
22
 
 
23
        // ===========================================================
 
24
        // Constructors
 
25
        // ===========================================================
 
26
 
 
27
        // ===========================================================
 
28
        // Getter & Setter
 
29
        // ===========================================================
 
30
 
 
31
        // ===========================================================
 
32
        // Methods from SuperClass/Interfaces
 
33
        // ===========================================================
 
34
 
 
35
        // ===========================================================
 
36
        // Methods
 
37
        // ===========================================================
 
38
        
 
39
        public static final String convertTimestampToUTCString(final long aTimestamp){
 
40
                return UTCSimpleDateFormat.format(new Date(aTimestamp));
 
41
        }
 
42
 
 
43
        // ===========================================================
 
44
        // Inner and Anonymous Classes
 
45
        // ===========================================================
 
46
}