from java.lang import *def getTime(): time = System.currentTimeMillis() print time return timeThat should do it. Good luck testing!
from java.util import *from java.text import *def getTime(): # Get an instance of the calendar calendar = Calendar.getInstance() # Set the day in the calendar day = calendar.get(Calendar.DAY_OF_WEEK) calendar.set(Calendar.DAY_OF_WEEK, day+1) # Retreive the date from the calendar date = calendar.getTime() # Create the date formatter myFormat = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'" formatter = SimpleDateFormat(myFormat) # Create, print, and return the timestamp timestamp = formatter.format(date) print timestamp return timestampWhere I set the day in the calendar you can see that I have incremented it by one. You can include any additional logic to modify the day as you would like. Just FYI: that day number is automatically wrapped so that if you go past the number of days in the month, it will automatically increment (or decrement) the month as well.