mirror of
https://github.com/processing/processing4.git
synced 2026-02-14 10:55:38 +01:00
tweaks for date problem (issue #864)
This commit is contained in:
@@ -10,14 +10,16 @@ X remove 'processing.test' package--people are posting on the market w/ it
|
||||
X too many 'already exists' messages
|
||||
X fix problem where creating a new AVD didn't update the device list
|
||||
X remove 'includeantruntime' warning
|
||||
X Android mode does not recognize library imports
|
||||
X http://code.google.com/p/processing/issues/detail?id=766
|
||||
X "Date could not be parsed" error
|
||||
X http://code.google.com/p/processing/issues/detail?id=864
|
||||
|
||||
_ if a sketch asks for android mode but it's not available
|
||||
_ (after a double-click)
|
||||
_ you get the "is android installed"? dialog, then it re-opens again
|
||||
_ without closing the other
|
||||
|
||||
_ Android mode does not recognize library imports
|
||||
_ http://code.google.com/p/processing/issues/detail?id=766
|
||||
_ usb host and nfc reader need other changes to the app hierarchy to work
|
||||
_ http://code.google.com/p/processing/issues/detail?id=767
|
||||
|
||||
|
||||
@@ -104,11 +104,11 @@ class AndroidSDK {
|
||||
for (String line : lines) {
|
||||
String[] m = PApplet.match(line, "Valid from: .* until: (.*)");
|
||||
if (m != null) {
|
||||
String timestamp = m[1];
|
||||
String timestamp = m[1].trim();
|
||||
// "Sun Jan 22 11:09:08 EST 2012"
|
||||
// Hilariously, this is the format of Date.toString(), however
|
||||
// it isn't the default for SimpleDateFormat or others. Yay!
|
||||
DateFormat df = new SimpleDateFormat("EEE MMM dd HH:mm:ss z yyyy");
|
||||
DateFormat df = new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy");
|
||||
try {
|
||||
Date date = df.parse(timestamp);
|
||||
long expireMillis = date.getTime();
|
||||
|
||||
Reference in New Issue
Block a user