I am writing a script that creates a new geodatabase, copies the feature classes from one geodatabase to this new geodatabase, and then writes the name of the feature class, the original geodatabase, the destination geodatabase, the date, and the time it was copied to a text file. I have all of that working correctly except for the time field. For some reason, the time stamp stays exactly the same despite copying the feature class over at different times. I tried nesting the time stamp within the for loop, but still they are all the same even though they are not copied instantaneously. If I leave the time stamp above the for loop, it stamps once, but if I nest it within the for loop, it still does the same thing. Has anyone encountered something like this before? I expected to have at least a few seconds between each copy.
for fc in fcs: arcpy.CopyFeatures_management(fc, output_geodat + "\\" + fc) fc_cop = str(fc) Hour = str(nowutc.hour) min = str(nowutc.minute) if len(str(min))<2: Min = "0"+str(min) else: Min = str(min) sec = str(nowutc.second) if len(str(sec))<2: Sec = "0"+str(sec) else: Sec = str(sec) Time2 = str((int(Hour)-4)) + ":" + str(Min) + ":" + str(Sec) print fc_cop +"," + geod + "," + output_geodat + "," + Date + "," + Time2 #Step 9: Log feature classes and date of copy. log("\n" + str(fc_cop) +"," + str(geod) + "," + str(output_geodat) + "," + str(Date) + "," + str(Time2)) print "Finished"