Community
Fusion Manufacture
Talk shop with the Fusion (formerly Fusion 360) Manufacture Community. Share tool strategies, tips, get advice and solve problems together with the best minds in the industry.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Wrong Generated At time zone?

6 REPLIES 6
Reply
Message 1 of 7
programming2C78B
152 Views, 6 Replies

Wrong Generated At time zone?

programming2C78B_0-1695992080507.png

I am on atlantic time and it is currently 9:54 but it always says 3 hrs ahead. This causes some issue with some operators who want to make sure they have the latest version. Yes, in the File Explorer it will show it modified in local time but Im just looking at how easy this is to remedy. 

Please click "Accept Solution" if what I wrote solved your issue!
6 REPLIES 6
Message 2 of 7

Hmm, I thought it pulled "System Time" for the "posted at" time..

Can I see the full string of your post processor that's spitting out the incorrect time?


Seth Madore
Customer Advocacy Manager - Manufacturing
Message 3 of 7

I just tested on my end, and setting my clock to Atlantic (one hour ahead of me) yielded:

(SEE SETUP SHEET)
(LAST RUN)(UNPROVEN)
(PROGRAM BY=STM)
(9/29/2023 12:41)

 

What I have for time/date is:

writeComment((now.getMonth()+1) + "/" + now.getDate() + "/" + now.getFullYear() + " " + now.getHours() + ":" + ('0'+now.getMinutes()).slice(-2));

Seth Madore
Customer Advocacy Manager - Manufacturing
Message 4 of 7

My post string is 

 

  // Job Details
  var writeDetails = true;

if (writeDetails) {
    writeComment("Posted: " + getGlobalParameter("generated-at"));
    writeComment("File: " + getGlobalParameter("document-path"));
    writeln(" ");
  }

 



do I replace "getGlobalParameter("generated-at")" with what your have?

Please click "Accept Solution" if what I wrote solved your issue!
Message 5 of 7

Hello,

 

I utilized your string below, time stamp is 4 hours faster than my current time.  Did you ever get a resolution for this issue to correct the problem?

 

Thanks, Mark  

Message 6 of 7

yeah, it's still "wrong" for us, but everyone on the floor who needs to know, knows. We check it by the Date Modified inside the file explorer more then the code itself (we use that only for the Posted Date)

Please click "Accept Solution" if what I wrote solved your issue!
Message 7 of 7

I was able to correct my issues. Here is what I did to resolve it.

Added these variables:
var now = new Date ();
var writeDetails = true

I added this to where I wanted wanted to see it on the post:
writeComment(localize("POST GENERATED ON") + " " + now.toLocaleDateString()
+ " " + now.toLocaleTimeString());


This is what it outputs on post:

(POST GENERATED ON TUESDAY, APRIL 09, 2024 06:47:12)

Hope this helps! Just figured it out last night.

Thanks, Mark



Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums