|
34 | 34 | import java.util.Map;
|
35 | 35 | import java.util.SortedSet;
|
36 | 36 | import java.util.TreeSet;
|
| 37 | +import java.util.Date; |
| 38 | +import java.util.GregorianCalendar; |
37 | 39 |
|
38 | 40 | import cc.arduino.MyStreamPumper;
|
39 | 41 | import cc.arduino.packages.BoardPort;
|
@@ -554,6 +556,17 @@ private PreferencesMap createBuildPreferences(String _buildPath,
|
554 | 556 | p.put("build.variant.path", "");
|
555 | 557 | }
|
556 | 558 |
|
| 559 | + // Build Time |
| 560 | + Date d = new Date(); |
| 561 | + GregorianCalendar cal = new GregorianCalendar(); |
| 562 | + long current = d.getTime()/1000; |
| 563 | + long timezone = cal.get(cal.ZONE_OFFSET)/1000; |
| 564 | + long daylight = cal.get(cal.DST_OFFSET)/1000; |
| 565 | + p.put("extra.time.utc", Long.toString(current)); |
| 566 | + p.put("extra.time.local", Long.toString(current + timezone + daylight)); |
| 567 | + p.put("extra.time.zone", Long.toString(timezone)); |
| 568 | + p.put("extra.time.dst", Long.toString(daylight)); |
| 569 | + |
557 | 570 | return p;
|
558 | 571 | }
|
559 | 572 |
|
@@ -1124,6 +1137,7 @@ void runActions(String recipeClass, PreferencesMap prefs) throws RunnerException
|
1124 | 1137 | void runRecipe(String recipe) throws RunnerException, PreferencesMapException {
|
1125 | 1138 | PreferencesMap dict = new PreferencesMap(prefs);
|
1126 | 1139 | dict.put("ide_version", "" + BaseNoGui.REVISION);
|
| 1140 | + dict.put("sketch_path", sketch.getFolder().getAbsolutePath()); |
1127 | 1141 |
|
1128 | 1142 | String[] cmdArray;
|
1129 | 1143 | String cmd = prefs.getOrExcept(recipe);
|
|
0 commit comments